Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterLoadtestWorkerServer(s grpc.ServiceRegistrar, srv LoadtestWorkerServer)
- type CheckRequest
- type CheckResponse
- func (*CheckResponse) Descriptor() ([]byte, []int)deprecated
- func (x *CheckResponse) GetBucketValues() []int64
- func (x *CheckResponse) GetFailed() int64
- func (x *CheckResponse) GetIsFinished() bool
- func (x *CheckResponse) GetReceivedMessages() []*MessageIdentifier
- func (x *CheckResponse) GetRunningDuration() *durationpb.Duration
- func (*CheckResponse) ProtoMessage()
- func (x *CheckResponse) ProtoReflect() protoreflect.Message
- func (x *CheckResponse) Reset()
- func (x *CheckResponse) String() string
- type LoadtestWorkerClient
- type LoadtestWorkerServer
- type MessageIdentifier
- func (*MessageIdentifier) Descriptor() ([]byte, []int)deprecated
- func (x *MessageIdentifier) GetPublisherClientId() int64
- func (x *MessageIdentifier) GetSequenceNumber() int32
- func (*MessageIdentifier) ProtoMessage()
- func (x *MessageIdentifier) ProtoReflect() protoreflect.Message
- func (x *MessageIdentifier) Reset()
- func (x *MessageIdentifier) String() string
- type PublisherOptions
- func (*PublisherOptions) Descriptor() ([]byte, []int)deprecated
- func (x *PublisherOptions) GetBatchDuration() *durationpb.Duration
- func (x *PublisherOptions) GetBatchSize() int32
- func (x *PublisherOptions) GetMessageSize() int32
- func (x *PublisherOptions) GetRate() float32
- func (*PublisherOptions) ProtoMessage()
- func (x *PublisherOptions) ProtoReflect() protoreflect.Message
- func (x *PublisherOptions) Reset()
- func (x *PublisherOptions) String() string
- type PubsubOptions
- type StartRequest
- func (*StartRequest) Descriptor() ([]byte, []int)deprecated
- func (m *StartRequest) GetClientOptions() isStartRequest_ClientOptions
- func (x *StartRequest) GetCpuScaling() int32
- func (x *StartRequest) GetIncludeIds() bool
- func (m *StartRequest) GetOptions() isStartRequest_Options
- func (x *StartRequest) GetProject() string
- func (x *StartRequest) GetPublisherOptions() *PublisherOptions
- func (x *StartRequest) GetPubsubOptions() *PubsubOptions
- func (x *StartRequest) GetStartTime() *timestamppb.Timestamp
- func (x *StartRequest) GetSubscriberOptions() *SubscriberOptions
- func (x *StartRequest) GetTestDuration() *durationpb.Duration
- func (x *StartRequest) GetTopic() string
- func (*StartRequest) ProtoMessage()
- func (x *StartRequest) ProtoReflect() protoreflect.Message
- func (x *StartRequest) Reset()
- func (x *StartRequest) String() string
- type StartRequest_PublisherOptions
- type StartRequest_PubsubOptions
- type StartRequest_SubscriberOptions
- type StartResponse
- type SubscriberOptions
- type UnimplementedLoadtestWorkerServer
- type UnsafeLoadtestWorkerServer
Constants ¶
const ( LoadtestWorker_Start_FullMethodName = "/google.pubsub.loadtest.LoadtestWorker/Start" LoadtestWorker_Check_FullMethodName = "/google.pubsub.loadtest.LoadtestWorker/Check" )
Variables ¶
var File_loadtest_proto protoreflect.FileDescriptor
var LoadtestWorker_ServiceDesc = grpc.ServiceDesc{ ServiceName: "google.pubsub.loadtest.LoadtestWorker", HandlerType: (*LoadtestWorkerServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Start", Handler: _LoadtestWorker_Start_Handler, }, { MethodName: "Check", Handler: _LoadtestWorker_Check_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "loadtest.proto", }
LoadtestWorker_ServiceDesc is the grpc.ServiceDesc for LoadtestWorker service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterLoadtestWorkerServer ¶
func RegisterLoadtestWorkerServer(s grpc.ServiceRegistrar, srv LoadtestWorkerServer)
Types ¶
type CheckRequest ¶
type CheckRequest struct {
// contains filtered or unexported fields
}
Request a statistics update.
func (*CheckRequest) Descriptor
deprecated
func (*CheckRequest) Descriptor() ([]byte, []int)
Deprecated: Use CheckRequest.ProtoReflect.Descriptor instead.
func (*CheckRequest) ProtoMessage ¶
func (*CheckRequest) ProtoMessage()
func (*CheckRequest) ProtoReflect ¶ added in v1.38.0
func (x *CheckRequest) ProtoReflect() protoreflect.Message
func (*CheckRequest) Reset ¶
func (x *CheckRequest) Reset()
func (*CheckRequest) String ¶
func (x *CheckRequest) String() string
type CheckResponse ¶
type CheckResponse struct {
// Histogram of latencies, each one a delta from the previous CheckResponse sent.
// The bounds of the nth bucket (starting from the 0th bucket) are
// [1.5^(n-1), 1.5^n) milliseconds. The lower bound of the 0th bucket is 0 seconds.
BucketValues []int64 `protobuf:"varint,1,rep,packed,name=bucket_values,json=bucketValues,proto3" json:"bucket_values,omitempty"`
// The duration from the start of the loadtest to its completion or now if is_finished is false.
RunningDuration *durationpb.Duration `protobuf:"bytes,2,opt,name=running_duration,json=runningDuration,proto3" json:"running_duration,omitempty"`
// True if the load test has finished running.
IsFinished bool `protobuf:"varint,3,opt,name=is_finished,json=isFinished,proto3" json:"is_finished,omitempty"`
// MessageIdentifiers of all messages since the last Check.
ReceivedMessages []*MessageIdentifier `protobuf:"bytes,4,rep,name=received_messages,json=receivedMessages,proto3" json:"received_messages,omitempty"`
// Number of failed messages since the last check.
Failed int64 `protobuf:"varint,5,opt,name=failed,proto3" json:"failed,omitempty"`
// contains filtered or unexported fields
}
func (*CheckResponse) Descriptor
deprecated
func (*CheckResponse) Descriptor() ([]byte, []int)
Deprecated: Use CheckResponse.ProtoReflect.Descriptor instead.
func (*CheckResponse) GetBucketValues ¶
func (x *CheckResponse) GetBucketValues() []int64
func (*CheckResponse) GetFailed ¶ added in v1.38.0
func (x *CheckResponse) GetFailed() int64
func (*CheckResponse) GetIsFinished ¶
func (x *CheckResponse) GetIsFinished() bool
func (*CheckResponse) GetReceivedMessages ¶
func (x *CheckResponse) GetReceivedMessages() []*MessageIdentifier
func (*CheckResponse) GetRunningDuration ¶
func (x *CheckResponse) GetRunningDuration() *durationpb.Duration
func (*CheckResponse) ProtoMessage ¶
func (*CheckResponse) ProtoMessage()
func (*CheckResponse) ProtoReflect ¶ added in v1.38.0
func (x *CheckResponse) ProtoReflect() protoreflect.Message
func (*CheckResponse) Reset ¶
func (x *CheckResponse) Reset()
func (*CheckResponse) String ¶
func (x *CheckResponse) String() string
type LoadtestWorkerClient ¶
type LoadtestWorkerClient interface {
// Starts a worker
Start(ctx context.Context, in *StartRequest, opts ...grpc.CallOption) (*StartResponse, error)
// Check the status of a load test worker.
Check(ctx context.Context, in *CheckRequest, opts ...grpc.CallOption) (*CheckResponse, error)
}
LoadtestWorkerClient is the client API for LoadtestWorker service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewLoadtestWorkerClient ¶
func NewLoadtestWorkerClient(cc grpc.ClientConnInterface) LoadtestWorkerClient
type LoadtestWorkerServer ¶
type LoadtestWorkerServer interface {
// Starts a worker
Start(context.Context, *StartRequest) (*StartResponse, error)
// Check the status of a load test worker.
Check(context.Context, *CheckRequest) (*CheckResponse, error)
// contains filtered or unexported methods
}
LoadtestWorkerServer is the server API for LoadtestWorker service. All implementations must embed UnimplementedLoadtestWorkerServer for forward compatibility
type 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,proto3" 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,proto3" json:"sequence_number,omitempty"`
// contains filtered or unexported fields
}
func (*MessageIdentifier) Descriptor
deprecated
func (*MessageIdentifier) Descriptor() ([]byte, []int)
Deprecated: Use MessageIdentifier.ProtoReflect.Descriptor instead.
func (*MessageIdentifier) GetPublisherClientId ¶
func (x *MessageIdentifier) GetPublisherClientId() int64
func (*MessageIdentifier) GetSequenceNumber ¶
func (x *MessageIdentifier) GetSequenceNumber() int32
func (*MessageIdentifier) ProtoMessage ¶
func (*MessageIdentifier) ProtoMessage()
func (*MessageIdentifier) ProtoReflect ¶ added in v1.38.0
func (x *MessageIdentifier) ProtoReflect() protoreflect.Message
func (*MessageIdentifier) Reset ¶
func (x *MessageIdentifier) Reset()
func (*MessageIdentifier) String ¶
func (x *MessageIdentifier) String() string
type PublisherOptions ¶ added in v1.38.0
type PublisherOptions struct {
// The max messages-per-second publishing rate. If unset, no rate limit will
// be imposed.
Rate float32 `protobuf:"fixed32,1,opt,name=rate,proto3" json:"rate,omitempty"`
// The max duration for coalescing a batch of published messages.
BatchDuration *durationpb.Duration `protobuf:"bytes,2,opt,name=batch_duration,json=batchDuration,proto3" json:"batch_duration,omitempty"`
// The number of user messages of size message_size to publish together.
BatchSize int32 `protobuf:"varint,3,opt,name=batch_size,json=batchSize,proto3" json:"batch_size,omitempty"`
// The size in bytes of messages to publish
MessageSize int32 `protobuf:"varint,4,opt,name=message_size,json=messageSize,proto3" json:"message_size,omitempty"`
// contains filtered or unexported fields
}
func (*PublisherOptions) Descriptor
deprecated
added in
v1.38.0
func (*PublisherOptions) Descriptor() ([]byte, []int)
Deprecated: Use PublisherOptions.ProtoReflect.Descriptor instead.
func (*PublisherOptions) GetBatchDuration ¶ added in v1.38.0
func (x *PublisherOptions) GetBatchDuration() *durationpb.Duration
func (*PublisherOptions) GetBatchSize ¶ added in v1.38.0
func (x *PublisherOptions) GetBatchSize() int32
func (*PublisherOptions) GetMessageSize ¶ added in v1.38.0
func (x *PublisherOptions) GetMessageSize() int32
func (*PublisherOptions) GetRate ¶ added in v1.38.0
func (x *PublisherOptions) GetRate() float32
func (*PublisherOptions) ProtoMessage ¶ added in v1.38.0
func (*PublisherOptions) ProtoMessage()
func (*PublisherOptions) ProtoReflect ¶ added in v1.38.0
func (x *PublisherOptions) ProtoReflect() protoreflect.Message
func (*PublisherOptions) Reset ¶ added in v1.38.0
func (x *PublisherOptions) Reset()
func (*PublisherOptions) String ¶ added in v1.38.0
func (x *PublisherOptions) String() string
type PubsubOptions ¶
type PubsubOptions struct {
// The Cloud Pub/Sub subscription name
Subscription string `protobuf:"bytes,1,opt,name=subscription,proto3" json:"subscription,omitempty"`
// contains filtered or unexported fields
}
func (*PubsubOptions) Descriptor
deprecated
func (*PubsubOptions) Descriptor() ([]byte, []int)
Deprecated: Use PubsubOptions.ProtoReflect.Descriptor instead.
func (*PubsubOptions) GetSubscription ¶
func (x *PubsubOptions) GetSubscription() string
func (*PubsubOptions) ProtoMessage ¶
func (*PubsubOptions) ProtoMessage()
func (*PubsubOptions) ProtoReflect ¶ added in v1.38.0
func (x *PubsubOptions) ProtoReflect() protoreflect.Message
func (*PubsubOptions) Reset ¶
func (x *PubsubOptions) Reset()
func (*PubsubOptions) String ¶
func (x *PubsubOptions) String() string
type StartRequest ¶
type StartRequest struct {
// The GCP project.
Project string `protobuf:"bytes,1,opt,name=project,proto3" json:"project,omitempty"`
// The Pub/Sub topic name.
Topic string `protobuf:"bytes,2,opt,name=topic,proto3" json:"topic,omitempty"`
// The time at which the load test should start. If this is less than the current time, we start immediately.
StartTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"`
// The duration the load test should run for.
TestDuration *durationpb.Duration `protobuf:"bytes,4,opt,name=test_duration,json=testDuration,proto3" json:"test_duration,omitempty"`
// Whether to include ids in check responses.
IncludeIds bool `protobuf:"varint,5,opt,name=include_ids,json=includeIds,proto3" json:"include_ids,omitempty"`
// Types that are assignable to Options:
//
// *StartRequest_PubsubOptions
Options isStartRequest_Options `protobuf_oneof:"options"`
// Types that are assignable to ClientOptions:
//
// *StartRequest_PublisherOptions
// *StartRequest_SubscriberOptions
ClientOptions isStartRequest_ClientOptions `protobuf_oneof:"client_options"`
// The cpu scaling of the worker. A multiple of the number of logical processors
// on the machine. The number of threads for the worker is calculated by
// max((numCpus * cpu_scaling), 1) for languages which use thread parallelism.
// Languages which use process parallelism ignore this setting.
CpuScaling int32 `protobuf:"varint,10,opt,name=cpu_scaling,json=cpuScaling,proto3" json:"cpu_scaling,omitempty"`
// contains filtered or unexported fields
}
func (*StartRequest) Descriptor
deprecated
func (*StartRequest) Descriptor() ([]byte, []int)
Deprecated: Use StartRequest.ProtoReflect.Descriptor instead.
func (*StartRequest) GetClientOptions ¶ added in v1.38.0
func (m *StartRequest) GetClientOptions() isStartRequest_ClientOptions
func (*StartRequest) GetCpuScaling ¶ added in v1.38.0
func (x *StartRequest) GetCpuScaling() int32
func (*StartRequest) GetIncludeIds ¶ added in v1.38.0
func (x *StartRequest) GetIncludeIds() bool
func (*StartRequest) GetOptions ¶
func (m *StartRequest) GetOptions() isStartRequest_Options
func (*StartRequest) GetProject ¶
func (x *StartRequest) GetProject() string
func (*StartRequest) GetPublisherOptions ¶ added in v1.38.0
func (x *StartRequest) GetPublisherOptions() *PublisherOptions
func (*StartRequest) GetPubsubOptions ¶
func (x *StartRequest) GetPubsubOptions() *PubsubOptions
func (*StartRequest) GetStartTime ¶
func (x *StartRequest) GetStartTime() *timestamppb.Timestamp
func (*StartRequest) GetSubscriberOptions ¶ added in v1.38.0
func (x *StartRequest) GetSubscriberOptions() *SubscriberOptions
func (*StartRequest) GetTestDuration ¶
func (x *StartRequest) GetTestDuration() *durationpb.Duration
func (*StartRequest) GetTopic ¶
func (x *StartRequest) GetTopic() string
func (*StartRequest) ProtoMessage ¶
func (*StartRequest) ProtoMessage()
func (*StartRequest) ProtoReflect ¶ added in v1.38.0
func (x *StartRequest) ProtoReflect() protoreflect.Message
func (*StartRequest) Reset ¶
func (x *StartRequest) Reset()
func (*StartRequest) String ¶
func (x *StartRequest) String() string
type StartRequest_PublisherOptions ¶ added in v1.38.0
type StartRequest_PublisherOptions struct {
PublisherOptions *PublisherOptions `protobuf:"bytes,8,opt,name=publisher_options,json=publisherOptions,proto3,oneof"`
}
type StartRequest_PubsubOptions ¶
type StartRequest_PubsubOptions struct {
PubsubOptions *PubsubOptions `protobuf:"bytes,6,opt,name=pubsub_options,json=pubsubOptions,proto3,oneof"`
}
type StartRequest_SubscriberOptions ¶ added in v1.38.0
type StartRequest_SubscriberOptions struct {
SubscriberOptions *SubscriberOptions `protobuf:"bytes,9,opt,name=subscriber_options,json=subscriberOptions,proto3,oneof"`
}
type StartResponse ¶
type StartResponse struct {
// contains filtered or unexported fields
}
func (*StartResponse) Descriptor
deprecated
func (*StartResponse) Descriptor() ([]byte, []int)
Deprecated: Use StartResponse.ProtoReflect.Descriptor instead.
func (*StartResponse) ProtoMessage ¶
func (*StartResponse) ProtoMessage()
func (*StartResponse) ProtoReflect ¶ added in v1.38.0
func (x *StartResponse) ProtoReflect() protoreflect.Message
func (*StartResponse) Reset ¶
func (x *StartResponse) Reset()
func (*StartResponse) String ¶
func (x *StartResponse) String() string
type SubscriberOptions ¶ added in v1.38.0
type SubscriberOptions struct {
// contains filtered or unexported fields
}
func (*SubscriberOptions) Descriptor
deprecated
added in
v1.38.0
func (*SubscriberOptions) Descriptor() ([]byte, []int)
Deprecated: Use SubscriberOptions.ProtoReflect.Descriptor instead.
func (*SubscriberOptions) ProtoMessage ¶ added in v1.38.0
func (*SubscriberOptions) ProtoMessage()
func (*SubscriberOptions) ProtoReflect ¶ added in v1.38.0
func (x *SubscriberOptions) ProtoReflect() protoreflect.Message
func (*SubscriberOptions) Reset ¶ added in v1.38.0
func (x *SubscriberOptions) Reset()
func (*SubscriberOptions) String ¶ added in v1.38.0
func (x *SubscriberOptions) String() string
type UnimplementedLoadtestWorkerServer ¶ added in v1.38.0
type UnimplementedLoadtestWorkerServer struct {
}
UnimplementedLoadtestWorkerServer must be embedded to have forward compatible implementations.
func (UnimplementedLoadtestWorkerServer) Check ¶ added in v1.38.0
func (UnimplementedLoadtestWorkerServer) Check(context.Context, *CheckRequest) (*CheckResponse, error)
func (UnimplementedLoadtestWorkerServer) Start ¶ added in v1.38.0
func (UnimplementedLoadtestWorkerServer) Start(context.Context, *StartRequest) (*StartResponse, error)
type UnsafeLoadtestWorkerServer ¶ added in v1.38.0
type UnsafeLoadtestWorkerServer interface {
// contains filtered or unexported methods
}
UnsafeLoadtestWorkerServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to LoadtestWorkerServer will result in compilation errors.