...

Package google_pubsub_loadtest

import "cloud.google.com/go/pubsub/loadtest/pb"
Overview
Index

Overview ▾

Index ▾

Constants
Variables
func RegisterLoadtestWorkerServer(s grpc.ServiceRegistrar, srv LoadtestWorkerServer)
type CheckRequest
    func (*CheckRequest) Descriptor() ([]byte, []int)
    func (*CheckRequest) ProtoMessage()
    func (x *CheckRequest) ProtoReflect() protoreflect.Message
    func (x *CheckRequest) Reset()
    func (x *CheckRequest) String() string
type CheckResponse
    func (*CheckResponse) Descriptor() ([]byte, []int)
    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
    func NewLoadtestWorkerClient(cc grpc.ClientConnInterface) LoadtestWorkerClient
type LoadtestWorkerServer
type MessageIdentifier
    func (*MessageIdentifier) Descriptor() ([]byte, []int)
    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)
    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
    func (*PubsubOptions) Descriptor() ([]byte, []int)
    func (x *PubsubOptions) GetSubscription() string
    func (*PubsubOptions) ProtoMessage()
    func (x *PubsubOptions) ProtoReflect() protoreflect.Message
    func (x *PubsubOptions) Reset()
    func (x *PubsubOptions) String() string
type StartRequest
    func (*StartRequest) Descriptor() ([]byte, []int)
    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
    func (*StartResponse) Descriptor() ([]byte, []int)
    func (*StartResponse) ProtoMessage()
    func (x *StartResponse) ProtoReflect() protoreflect.Message
    func (x *StartResponse) Reset()
    func (x *StartResponse) String() string
type SubscriberOptions
    func (*SubscriberOptions) Descriptor() ([]byte, []int)
    func (*SubscriberOptions) ProtoMessage()
    func (x *SubscriberOptions) ProtoReflect() protoreflect.Message
    func (x *SubscriberOptions) Reset()
    func (x *SubscriberOptions) String() string
type UnimplementedLoadtestWorkerServer
    func (UnimplementedLoadtestWorkerServer) Check(context.Context, *CheckRequest) (*CheckResponse, error)
    func (UnimplementedLoadtestWorkerServer) Start(context.Context, *StartRequest) (*StartResponse, error)
type UnsafeLoadtestWorkerServer

Package files

loadtest.pb.go loadtest_grpc.pb.go

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

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)

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",
}

func RegisterLoadtestWorkerServer

func RegisterLoadtestWorkerServer(s grpc.ServiceRegistrar, srv LoadtestWorkerServer)

type CheckRequest

Request a statistics update.

type CheckRequest struct {
    // contains filtered or unexported fields
}

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

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

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

type LoadtestWorkerClient

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.

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)
}

func NewLoadtestWorkerClient

func NewLoadtestWorkerClient(cc grpc.ClientConnInterface) LoadtestWorkerClient

type LoadtestWorkerServer

LoadtestWorkerServer is the server API for LoadtestWorker service. All implementations must embed UnimplementedLoadtestWorkerServer for forward compatibility

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
}

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

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

type 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

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

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

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

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

type StartRequest_PublisherOptions

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

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

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

type 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

type UnimplementedLoadtestWorkerServer

UnimplementedLoadtestWorkerServer must be embedded to have forward compatible implementations.

type UnimplementedLoadtestWorkerServer struct {
}

func (UnimplementedLoadtestWorkerServer) Check

func (UnimplementedLoadtestWorkerServer) Check(context.Context, *CheckRequest) (*CheckResponse, error)

func (UnimplementedLoadtestWorkerServer) Start

func (UnimplementedLoadtestWorkerServer) Start(context.Context, *StartRequest) (*StartResponse, error)

type UnsafeLoadtestWorkerServer

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.

type UnsafeLoadtestWorkerServer interface {
    // contains filtered or unexported methods
}