Constants
LoadtestWorker_Start_FullMethodName, LoadtestWorker_Check_FullMethodName
const
(
LoadtestWorker_Start_FullMethodName
=
"/google.pubsub.loadtest.LoadtestWorker/Start"
LoadtestWorker_Check_FullMethodName
=
"/google.pubsub.loadtest.LoadtestWorker/Check"
)
Variables
File_loadtest_proto
var
File_loadtest_proto
protoreflect
.
FileDescriptor
LoadtestWorker_ServiceDesc
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
)
CheckRequest
type
CheckRequest
struct
{
// contains filtered or unexported fields
}
Request a statistics update.
func (*CheckRequest) Descriptor
func
(
*
CheckRequest
)
Descriptor
()
([]
byte
,
[]
int
)
Deprecated: Use CheckRequest.ProtoReflect.Descriptor instead.
func (*CheckRequest) ProtoMessage
func
(
*
CheckRequest
)
ProtoMessage
()
func (*CheckRequest) ProtoReflect
func
(
x
*
CheckRequest
)
ProtoReflect
()
protoreflect
.
Message
func (*CheckRequest) Reset
func
(
x
*
CheckRequest
)
Reset
()
func (*CheckRequest) String
func
(
x
*
CheckRequest
)
String
()
string
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
func
(
*
CheckResponse
)
Descriptor
()
([]
byte
,
[]
int
)
Deprecated: Use CheckResponse.ProtoReflect.Descriptor instead.
func (*CheckResponse) GetBucketValues
func
(
x
*
CheckResponse
)
GetBucketValues
()
[]
int64
func (*CheckResponse) GetFailed
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
func
(
x
*
CheckResponse
)
ProtoReflect
()
protoreflect
.
Message
func (*CheckResponse) Reset
func
(
x
*
CheckResponse
)
Reset
()
func (*CheckResponse) String
func
(
x
*
CheckResponse
)
String
()
string
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
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
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
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
func
(
x
*
MessageIdentifier
)
ProtoReflect
()
protoreflect
.
Message
func (*MessageIdentifier) Reset
func
(
x
*
MessageIdentifier
)
Reset
()
func (*MessageIdentifier) String
func
(
x
*
MessageIdentifier
)
String
()
string
PublisherOptions
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
func
(
*
PublisherOptions
)
Descriptor
()
([]
byte
,
[]
int
)
Deprecated: Use PublisherOptions.ProtoReflect.Descriptor instead.
func (*PublisherOptions) GetBatchDuration
func
(
x
*
PublisherOptions
)
GetBatchDuration
()
*
durationpb
.
Duration
func (*PublisherOptions) GetBatchSize
func
(
x
*
PublisherOptions
)
GetBatchSize
()
int32
func (*PublisherOptions) GetMessageSize
func
(
x
*
PublisherOptions
)
GetMessageSize
()
int32
func (*PublisherOptions) GetRate
func
(
x
*
PublisherOptions
)
GetRate
()
float32
func (*PublisherOptions) ProtoMessage
func
(
*
PublisherOptions
)
ProtoMessage
()
func (*PublisherOptions) ProtoReflect
func
(
x
*
PublisherOptions
)
ProtoReflect
()
protoreflect
.
Message
func (*PublisherOptions) Reset
func
(
x
*
PublisherOptions
)
Reset
()
func (*PublisherOptions) String
func
(
x
*
PublisherOptions
)
String
()
string
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
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
func
(
x
*
PubsubOptions
)
ProtoReflect
()
protoreflect
.
Message
func (*PubsubOptions) Reset
func
(
x
*
PubsubOptions
)
Reset
()
func (*PubsubOptions) String
func
(
x
*
PubsubOptions
)
String
()
string
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
func
(
*
StartRequest
)
Descriptor
()
([]
byte
,
[]
int
)
Deprecated: Use StartRequest.ProtoReflect.Descriptor instead.
func (*StartRequest) GetClientOptions
func
(
m
*
StartRequest
)
GetClientOptions
()
isStartRequest_ClientOptions
func (*StartRequest) GetCpuScaling
func
(
x
*
StartRequest
)
GetCpuScaling
()
int32
func (*StartRequest) GetIncludeIds
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
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
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
func
(
x
*
StartRequest
)
ProtoReflect
()
protoreflect
.
Message
func (*StartRequest) Reset
func
(
x
*
StartRequest
)
Reset
()
func (*StartRequest) String
func
(
x
*
StartRequest
)
String
()
string
StartRequest_PublisherOptions
type
StartRequest_PublisherOptions
struct
{
PublisherOptions
*
PublisherOptions
`protobuf:"bytes,8,opt,name=publisher_options,json=publisherOptions,proto3,oneof"`
}
StartRequest_PubsubOptions
type
StartRequest_PubsubOptions
struct
{
PubsubOptions
*
PubsubOptions
`protobuf:"bytes,6,opt,name=pubsub_options,json=pubsubOptions,proto3,oneof"`
}
StartRequest_SubscriberOptions
type
StartRequest_SubscriberOptions
struct
{
SubscriberOptions
*
SubscriberOptions
`protobuf:"bytes,9,opt,name=subscriber_options,json=subscriberOptions,proto3,oneof"`
}
StartResponse
type
StartResponse
struct
{
// contains filtered or unexported fields
}
func (*StartResponse) Descriptor
func
(
*
StartResponse
)
Descriptor
()
([]
byte
,
[]
int
)
Deprecated: Use StartResponse.ProtoReflect.Descriptor instead.
func (*StartResponse) ProtoMessage
func
(
*
StartResponse
)
ProtoMessage
()
func (*StartResponse) ProtoReflect
func
(
x
*
StartResponse
)
ProtoReflect
()
protoreflect
.
Message
func (*StartResponse) Reset
func
(
x
*
StartResponse
)
Reset
()
func (*StartResponse) String
func
(
x
*
StartResponse
)
String
()
string
SubscriberOptions
type
SubscriberOptions
struct
{
// contains filtered or unexported fields
}
func (*SubscriberOptions) Descriptor
func
(
*
SubscriberOptions
)
Descriptor
()
([]
byte
,
[]
int
)
Deprecated: Use SubscriberOptions.ProtoReflect.Descriptor instead.
func (*SubscriberOptions) ProtoMessage
func
(
*
SubscriberOptions
)
ProtoMessage
()
func (*SubscriberOptions) ProtoReflect
func
(
x
*
SubscriberOptions
)
ProtoReflect
()
protoreflect
.
Message
func (*SubscriberOptions) Reset
func
(
x
*
SubscriberOptions
)
Reset
()
func (*SubscriberOptions) String
func
(
x
*
SubscriberOptions
)
String
()
string
UnimplementedLoadtestWorkerServer
type
UnimplementedLoadtestWorkerServer
struct
{
}
UnimplementedLoadtestWorkerServer must be embedded to have forward compatible implementations.
func (UnimplementedLoadtestWorkerServer) Check
func
(
UnimplementedLoadtestWorkerServer
)
Check
(
context
.
Context
,
*
CheckRequest
)
(
*
CheckResponse
,
error
)
func (UnimplementedLoadtestWorkerServer) Start
func
(
UnimplementedLoadtestWorkerServer
)
Start
(
context
.
Context
,
*
StartRequest
)
(
*
StartResponse
,
error
)
UnsafeLoadtestWorkerServer
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.