Package google_pubsub_loadtest is a generated protocol buffer package.
It is generated from these files:
loadtest.proto
It has these top-level messages:
StartRequest StartResponse PubsubOptions KafkaOptions MessageIdentifier CheckRequest CheckResponse ExecuteRequest ExecuteResponse
Functions
func RegisterLoadtestServer
func RegisterLoadtestServer(s *grpc.Server, srv LoadtestServer)
func RegisterLoadtestWorkerServer
func RegisterLoadtestWorkerServer(s *grpc.Server, srv LoadtestWorkerServer)
CheckRequest
type CheckRequest struct {
// Duplicate messages that should not be reported for throughput and latency.
Duplicates []*MessageIdentifier `protobuf:"bytes,1,rep,name=duplicates" json:"duplicates,omitempty"`
}
func (*CheckRequest) Descriptor
func (*CheckRequest) Descriptor() ([]byte, []int)
func (*CheckRequest) GetDuplicates
func (m *CheckRequest) GetDuplicates() []*MessageIdentifier
func (*CheckRequest) ProtoMessage
func (*CheckRequest) ProtoMessage()
func (*CheckRequest) Reset
func (m *CheckRequest) Reset()
func (*CheckRequest) String
func (m *CheckRequest) String() string
CheckResponse
type CheckResponse struct {
// Histogram of latencies, each one a delta from the previous CheckResponse sent.
BucketValues []int64 `protobuf:"varint,1,rep,packed,name=bucket_values,json=bucketValues" json:"bucket_values,omitempty"`
// The duration from the start of the loadtest to its completion or now if is_finished is false.
RunningDuration *google_protobuf.Duration `protobuf:"bytes,2,opt,name=running_duration,json=runningDuration" json:"running_duration,omitempty"`
// True if the load test has finished running.
IsFinished bool `protobuf:"varint,3,opt,name=is_finished,json=isFinished" json:"is_finished,omitempty"`
// MessageIdentifiers of all received messages since the last Check
ReceivedMessages []*MessageIdentifier `protobuf:"bytes,4,rep,name=received_messages,json=receivedMessages" json:"received_messages,omitempty"`
}
func (*CheckResponse) Descriptor
func (*CheckResponse) Descriptor() ([]byte, []int)
func (*CheckResponse) GetBucketValues
func (m *CheckResponse) GetBucketValues() []int64
func (*CheckResponse) GetIsFinished
func (m *CheckResponse) GetIsFinished() bool
func (*CheckResponse) GetReceivedMessages
func (m *CheckResponse) GetReceivedMessages() []*MessageIdentifier
func (*CheckResponse) GetRunningDuration
func (m *CheckResponse) GetRunningDuration() *google_protobuf.Duration
func (*CheckResponse) ProtoMessage
func (*CheckResponse) ProtoMessage()
func (*CheckResponse) Reset
func (m *CheckResponse) Reset()
func (*CheckResponse) String
func (m *CheckResponse) String() string
ExecuteRequest
type ExecuteRequest struct {
}
func (*ExecuteRequest) Descriptor
func (*ExecuteRequest) Descriptor() ([]byte, []int)
func (*ExecuteRequest) ProtoMessage
func (*ExecuteRequest) ProtoMessage()
func (*ExecuteRequest) Reset
func (m *ExecuteRequest) Reset()
func (*ExecuteRequest) String
func (m *ExecuteRequest) String() string
ExecuteResponse
type ExecuteResponse struct {
// Latencies of the completed operations
Latencies []int64 `protobuf:"varint,1,rep,packed,name=latencies" json:"latencies,omitempty"`
// MessageIdentifiers of all received messages since the last Execute
ReceivedMessages []*MessageIdentifier `protobuf:"bytes,2,rep,name=received_messages,json=receivedMessages" json:"received_messages,omitempty"`
}
func (*ExecuteResponse) Descriptor
func (*ExecuteResponse) Descriptor() ([]byte, []int)
func (*ExecuteResponse) GetLatencies
func (m *ExecuteResponse) GetLatencies() []int64
func (*ExecuteResponse) GetReceivedMessages
func (m *ExecuteResponse) GetReceivedMessages() []*MessageIdentifier
func (*ExecuteResponse) ProtoMessage
func (*ExecuteResponse) ProtoMessage()
func (*ExecuteResponse) Reset
func (m *ExecuteResponse) Reset()
func (*ExecuteResponse) String
func (m *ExecuteResponse) String() string
KafkaOptions
type KafkaOptions struct {
// The network address of the Kafka broker.
Broker string `protobuf:"bytes,1,opt,name=broker" json:"broker,omitempty"`
// The length of time to poll for.
PollDuration *google_protobuf.Duration `protobuf:"bytes,2,opt,name=poll_duration,json=pollDuration" json:"poll_duration,omitempty"`
}
func (*KafkaOptions) Descriptor
func (*KafkaOptions) Descriptor() ([]byte, []int)
func (*KafkaOptions) GetBroker
func (m *KafkaOptions) GetBroker() string
func (*KafkaOptions) GetPollDuration
func (m *KafkaOptions) GetPollDuration() *google_protobuf.Duration
func (*KafkaOptions) ProtoMessage
func (*KafkaOptions) ProtoMessage()
func (*KafkaOptions) Reset
func (m *KafkaOptions) Reset()
func (*KafkaOptions) String
func (m *KafkaOptions) String() string
LoadtestClient
type LoadtestClient interface {
// Starts a load test
Start(ctx context.Context, in *StartRequest, opts ...grpc.CallOption) (*StartResponse, error)
// Checks the status of a load test
Check(ctx context.Context, in *CheckRequest, opts ...grpc.CallOption) (*CheckResponse, error)
}
func NewLoadtestClient
func NewLoadtestClient(cc *grpc.ClientConn) LoadtestClient
LoadtestServer
type LoadtestServer interface {
// Starts a load test
Start(context.Context, *StartRequest) (*StartResponse, error)
// Checks the status of a load test
Check(context.Context, *CheckRequest) (*CheckResponse, error)
}
LoadtestWorkerClient
type LoadtestWorkerClient interface {
// Starts a worker
Start(ctx context.Context, in *StartRequest, opts ...grpc.CallOption) (*StartResponse, error)
// Executes a command on the worker, returning the latencies of the operations. Since some
// commands consist of multiple operations (i.e. pulls contain many received messages with
// different end to end latencies) a single command can have multiple latencies returned.
Execute(ctx context.Context, in *ExecuteRequest, opts ...grpc.CallOption) (*ExecuteResponse, error)
}
func NewLoadtestWorkerClient
func NewLoadtestWorkerClient(cc *grpc.ClientConn) LoadtestWorkerClient
LoadtestWorkerServer
type LoadtestWorkerServer interface {
// Starts a worker
Start(context.Context, *StartRequest) (*StartResponse, error)
// Executes a command on the worker, returning the latencies of the operations. Since some
// commands consist of multiple operations (i.e. pulls contain many received messages with
// different end to end latencies) a single command can have multiple latencies returned.
Execute(context.Context, *ExecuteRequest) (*ExecuteResponse, error)
}
MessageIdentifier
type MessageIdentifier struct {
// The unique id of the client that published the message.
PublisherClientId int64 `protobuf:"varint,1,opt,name=publisher_client_id,json=publisherClientId" json:"publisher_client_id,omitempty"`
// Sequence number of the published message with the given publish_client_id.
SequenceNumber int32 `protobuf:"varint,2,opt,name=sequence_number,json=sequenceNumber" json:"sequence_number,omitempty"`
}
func (*MessageIdentifier) Descriptor
func (*MessageIdentifier) Descriptor() ([]byte, []int)
func (*MessageIdentifier) GetPublisherClientId
func (m *MessageIdentifier) GetPublisherClientId() int64
func (*MessageIdentifier) GetSequenceNumber
func (m *MessageIdentifier) GetSequenceNumber() int32
func (*MessageIdentifier) ProtoMessage
func (*MessageIdentifier) ProtoMessage()
func (*MessageIdentifier) Reset
func (m *MessageIdentifier) Reset()
func (*MessageIdentifier) String
func (m *MessageIdentifier) String() string
PubsubOptions
type PubsubOptions struct {
// The Cloud Pub/Sub subscription name
Subscription string `protobuf:"bytes,1,opt,name=subscription" json:"subscription,omitempty"`
// The maximum number of messages to pull which each request.
MaxMessagesPerPull int32 `protobuf:"varint,2,opt,name=max_messages_per_pull,json=maxMessagesPerPull" json:"max_messages_per_pull,omitempty"`
}
func (*PubsubOptions) Descriptor
func (*PubsubOptions) Descriptor() ([]byte, []int)
func (*PubsubOptions) GetMaxMessagesPerPull
func (m *PubsubOptions) GetMaxMessagesPerPull() int32
func (*PubsubOptions) GetSubscription
func (m *PubsubOptions) GetSubscription() string
func (*PubsubOptions) ProtoMessage
func (*PubsubOptions) ProtoMessage()
func (*PubsubOptions) Reset
func (m *PubsubOptions) Reset()
func (*PubsubOptions) String
func (m *PubsubOptions) String() string
StartRequest
type StartRequest struct {
// The GCP project. This must be set even for Kafka, as we use it to export metrics.
Project string `protobuf:"bytes,1,opt,name=project" json:"project,omitempty"`
// The Pub/Sub or Kafka topic name.
Topic string `protobuf:"bytes,2,opt,name=topic" json:"topic,omitempty"`
// The number of requests that can be made, each second, per client.
RequestRate int32 `protobuf:"varint,3,opt,name=request_rate,json=requestRate" json:"request_rate,omitempty"`
// The size of each user message to publish
MessageSize int32 `protobuf:"varint,4,opt,name=message_size,json=messageSize" json:"message_size,omitempty"`
// The maximum outstanding requests, per client.
MaxOutstandingRequests int32 `protobuf:"varint,5,opt,name=max_outstanding_requests,json=maxOutstandingRequests" json:"max_outstanding_requests,omitempty"`
// The time at which the load test should start. If this is less than the current time, we start immediately.
StartTime *google_protobuf1.Timestamp `protobuf:"bytes,6,opt,name=start_time,json=startTime" json:"start_time,omitempty"`
// The burn-in duration, before which results should not be reported.
BurnInDuration *google_protobuf.Duration `protobuf:"bytes,12,opt,name=burn_in_duration,json=burnInDuration" json:"burn_in_duration,omitempty"`
// The number of user messages of size message_size to publish together.
PublishBatchSize int32 `protobuf:"varint,11,opt,name=publish_batch_size,json=publishBatchSize" json:"publish_batch_size,omitempty"`
// The max duration for coalescing a batch of published messages.
PublishBatchDuration *google_protobuf.Duration `protobuf:"bytes,13,opt,name=publish_batch_duration,json=publishBatchDuration" json:"publish_batch_duration,omitempty"`
// Types that are valid to be assigned to StopConditions:
// *StartRequest_TestDuration
// *StartRequest_NumberOfMessages
StopConditions isStartRequest_StopConditions `protobuf_oneof:"stop_conditions"`
// Types that are valid to be assigned to Options:
// *StartRequest_PubsubOptions
// *StartRequest_KafkaOptions
Options isStartRequest_Options `protobuf_oneof:"options"`
}
func (*StartRequest) Descriptor
func (*StartRequest) Descriptor() ([]byte, []int)
func (*StartRequest) GetBurnInDuration
func (m *StartRequest) GetBurnInDuration() *google_protobuf.Duration
func (*StartRequest) GetKafkaOptions
func (m *StartRequest) GetKafkaOptions() *KafkaOptions
func (*StartRequest) GetMaxOutstandingRequests
func (m *StartRequest) GetMaxOutstandingRequests() int32
func (*StartRequest) GetMessageSize
func (m *StartRequest) GetMessageSize() int32
func (*StartRequest) GetNumberOfMessages
func (m *StartRequest) GetNumberOfMessages() int32
func (*StartRequest) GetOptions
func (m *StartRequest) GetOptions() isStartRequest_Options
func (*StartRequest) GetProject
func (m *StartRequest) GetProject() string
func (*StartRequest) GetPublishBatchDuration
func (m *StartRequest) GetPublishBatchDuration() *google_protobuf.Duration
func (*StartRequest) GetPublishBatchSize
func (m *StartRequest) GetPublishBatchSize() int32
func (*StartRequest) GetPubsubOptions
func (m *StartRequest) GetPubsubOptions() *PubsubOptions
func (*StartRequest) GetRequestRate
func (m *StartRequest) GetRequestRate() int32
func (*StartRequest) GetStartTime
func (m *StartRequest) GetStartTime() *google_protobuf1.Timestamp
func (*StartRequest) GetStopConditions
func (m *StartRequest) GetStopConditions() isStartRequest_StopConditions
func (*StartRequest) GetTestDuration
func (m *StartRequest) GetTestDuration() *google_protobuf.Duration
func (*StartRequest) GetTopic
func (m *StartRequest) GetTopic() string
func (*StartRequest) ProtoMessage
func (*StartRequest) ProtoMessage()
func (*StartRequest) Reset
func (m *StartRequest) Reset()
func (*StartRequest) String
func (m *StartRequest) String() string
func (*StartRequest) XXX_OneofFuncs
func (*StartRequest) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})
XXX_OneofFuncs is for the internal use of the proto package.
StartRequest_KafkaOptions
type StartRequest_KafkaOptions struct {
KafkaOptions *KafkaOptions `protobuf:"bytes,10,opt,name=kafka_options,json=kafkaOptions,oneof"`
}
StartRequest_NumberOfMessages
type StartRequest_NumberOfMessages struct {
NumberOfMessages int32 `protobuf:"varint,8,opt,name=number_of_messages,json=numberOfMessages,oneof"`
}
StartRequest_PubsubOptions
type StartRequest_PubsubOptions struct {
PubsubOptions *PubsubOptions `protobuf:"bytes,9,opt,name=pubsub_options,json=pubsubOptions,oneof"`
}
StartRequest_TestDuration
type StartRequest_TestDuration struct {
TestDuration *google_protobuf.Duration `protobuf:"bytes,7,opt,name=test_duration,json=testDuration,oneof"`
}
StartResponse
type StartResponse struct {
}
func (*StartResponse) Descriptor
func (*StartResponse) Descriptor() ([]byte, []int)
func (*StartResponse) ProtoMessage
func (*StartResponse) ProtoMessage()
func (*StartResponse) Reset
func (m *StartResponse) Reset()
func (*StartResponse) String
func (m *StartResponse) String() string