Documentation ¶
Overview ¶
Package google provides a client for interacting with Google Cloud Pub/Sub.This package facilitates interaction with Google Cloud Pub/Sub, allowing publishing and subscribing to topics, managing subscriptions, and handling messages.
Package google is a generated GoMock package.
Package google is a generated GoMock package.
Index ¶
- func New(conf Config, logger pubsub.Logger, metrics Metrics) *googleClient
- type Client
- type Config
- type Metrics
- type MockClient
- func (m *MockClient) Close() error
- func (m *MockClient) CreateSubscription(ctx context.Context, id string, cfg pubsub.SubscriptionConfig) (*pubsub.Subscription, error)
- func (m *MockClient) CreateTopic(ctx context.Context, topicID string) (*pubsub.Topic, error)
- func (m *MockClient) EXPECT() *MockClientMockRecorder
- func (m *MockClient) Subscription(id string) *pubsub.Subscription
- func (m *MockClient) Subscriptions(ctx context.Context) *pubsub.SubscriptionIterator
- func (m *MockClient) Topic(id string) *pubsub.Topic
- func (m *MockClient) Topics(ctx context.Context) *pubsub.TopicIterator
- type MockClientMockRecorder
- func (mr *MockClientMockRecorder) Close() *gomock.Call
- func (mr *MockClientMockRecorder) CreateSubscription(ctx, id, cfg any) *gomock.Call
- func (mr *MockClientMockRecorder) CreateTopic(ctx, topicID any) *gomock.Call
- func (mr *MockClientMockRecorder) Subscription(id any) *gomock.Call
- func (mr *MockClientMockRecorder) Subscriptions(ctx any) *gomock.Call
- func (mr *MockClientMockRecorder) Topic(id any) *gomock.Call
- func (mr *MockClientMockRecorder) Topics(ctx any) *gomock.Call
- type MockMetrics
- type MockMetricsMockRecorder
- type MockReader
- type MockReaderMockRecorder
- type MockWriter
- type MockWriterMockRecorder
- type Reader
- type Writer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type MockClient ¶ added in v1.28.2
type MockClient struct {
// contains filtered or unexported fields
}
MockClient is a mock of Client interface.
func NewMockClient ¶ added in v1.28.2
func NewMockClient(ctrl *gomock.Controller) *MockClient
NewMockClient creates a new mock instance.
func (*MockClient) Close ¶ added in v1.28.2
func (m *MockClient) Close() error
Close mocks base method.
func (*MockClient) CreateSubscription ¶ added in v1.28.2
func (m *MockClient) CreateSubscription(ctx context.Context, id string, cfg pubsub.SubscriptionConfig) (*pubsub.Subscription, error)
CreateSubscription mocks base method.
func (*MockClient) CreateTopic ¶ added in v1.28.2
CreateTopic mocks base method.
func (*MockClient) EXPECT ¶ added in v1.28.2
func (m *MockClient) EXPECT() *MockClientMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockClient) Subscription ¶ added in v1.28.2
func (m *MockClient) Subscription(id string) *pubsub.Subscription
Subscription mocks base method.
func (*MockClient) Subscriptions ¶ added in v1.28.2
func (m *MockClient) Subscriptions(ctx context.Context) *pubsub.SubscriptionIterator
Subscriptions mocks base method.
func (*MockClient) Topic ¶ added in v1.28.2
func (m *MockClient) Topic(id string) *pubsub.Topic
Topic mocks base method.
func (*MockClient) Topics ¶ added in v1.28.2
func (m *MockClient) Topics(ctx context.Context) *pubsub.TopicIterator
Topics mocks base method.
type MockClientMockRecorder ¶ added in v1.28.2
type MockClientMockRecorder struct {
// contains filtered or unexported fields
}
MockClientMockRecorder is the mock recorder for MockClient.
func (*MockClientMockRecorder) Close ¶ added in v1.28.2
func (mr *MockClientMockRecorder) Close() *gomock.Call
Close indicates an expected call of Close.
func (*MockClientMockRecorder) CreateSubscription ¶ added in v1.28.2
func (mr *MockClientMockRecorder) CreateSubscription(ctx, id, cfg any) *gomock.Call
CreateSubscription indicates an expected call of CreateSubscription.
func (*MockClientMockRecorder) CreateTopic ¶ added in v1.28.2
func (mr *MockClientMockRecorder) CreateTopic(ctx, topicID any) *gomock.Call
CreateTopic indicates an expected call of CreateTopic.
func (*MockClientMockRecorder) Subscription ¶ added in v1.28.2
func (mr *MockClientMockRecorder) Subscription(id any) *gomock.Call
Subscription indicates an expected call of Subscription.
func (*MockClientMockRecorder) Subscriptions ¶ added in v1.28.2
func (mr *MockClientMockRecorder) Subscriptions(ctx any) *gomock.Call
Subscriptions indicates an expected call of Subscriptions.
type MockMetrics ¶
type MockMetrics struct {
// contains filtered or unexported fields
}
MockMetrics is a mock of Metrics interface.
func NewMockMetrics ¶
func NewMockMetrics(ctrl *gomock.Controller) *MockMetrics
NewMockMetrics creates a new mock instance.
func (*MockMetrics) EXPECT ¶
func (m *MockMetrics) EXPECT() *MockMetricsMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockMetrics) IncrementCounter ¶
func (m *MockMetrics) IncrementCounter(ctx context.Context, name string, labels ...string)
IncrementCounter mocks base method.
type MockMetricsMockRecorder ¶
type MockMetricsMockRecorder struct {
// contains filtered or unexported fields
}
MockMetricsMockRecorder is the mock recorder for MockMetrics.
func (*MockMetricsMockRecorder) IncrementCounter ¶
func (mr *MockMetricsMockRecorder) IncrementCounter(ctx, name any, labels ...any) *gomock.Call
IncrementCounter indicates an expected call of IncrementCounter.
type MockReader ¶ added in v1.28.2
type MockReader struct {
// contains filtered or unexported fields
}
MockReader is a mock of Reader interface.
func NewMockReader ¶ added in v1.28.2
func NewMockReader(ctrl *gomock.Controller) *MockReader
NewMockReader creates a new mock instance.
func (*MockReader) CreateTopic ¶ added in v1.28.2
CreateTopic mocks base method.
func (*MockReader) EXPECT ¶ added in v1.28.2
func (m *MockReader) EXPECT() *MockReaderMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockReaderMockRecorder ¶ added in v1.28.2
type MockReaderMockRecorder struct {
// contains filtered or unexported fields
}
MockReaderMockRecorder is the mock recorder for MockReader.
func (*MockReaderMockRecorder) CreateTopic ¶ added in v1.28.2
func (mr *MockReaderMockRecorder) CreateTopic(ctx, topicID any) *gomock.Call
CreateTopic indicates an expected call of CreateTopic.
type MockWriter ¶ added in v1.28.2
type MockWriter struct {
// contains filtered or unexported fields
}
MockWriter is a mock of Writer interface.
func NewMockWriter ¶ added in v1.28.2
func NewMockWriter(ctrl *gomock.Controller) *MockWriter
NewMockWriter creates a new mock instance.
func (*MockWriter) CreateSubscription ¶ added in v1.28.2
func (m *MockWriter) CreateSubscription(ctx context.Context, id string, cfg pubsub.SubscriptionConfig) (*pubsub.Subscription, error)
CreateSubscription mocks base method.
func (*MockWriter) EXPECT ¶ added in v1.28.2
func (m *MockWriter) EXPECT() *MockWriterMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockWriter) Subscription ¶ added in v1.28.2
func (m *MockWriter) Subscription(id string) *pubsub.Subscription
Subscription mocks base method.
type MockWriterMockRecorder ¶ added in v1.28.2
type MockWriterMockRecorder struct {
// contains filtered or unexported fields
}
MockWriterMockRecorder is the mock recorder for MockWriter.
func (*MockWriterMockRecorder) CreateSubscription ¶ added in v1.28.2
func (mr *MockWriterMockRecorder) CreateSubscription(ctx, id, cfg any) *gomock.Call
CreateSubscription indicates an expected call of CreateSubscription.
func (*MockWriterMockRecorder) Subscription ¶ added in v1.28.2
func (mr *MockWriterMockRecorder) Subscription(id any) *gomock.Call
Subscription indicates an expected call of Subscription.
type Writer ¶
type Writer interface { Subscription(id string) *pubsub.Subscription CreateSubscription(ctx context.Context, id string, cfg pubsub.SubscriptionConfig) (*pubsub.Subscription, error) }