Documentation
¶
Overview ¶
Package mysql is a generated GoMock package.
Index ¶
- Constants
- Variables
- func NewPublisher(logger *zap.SugaredLogger, scope tally.Scope, messageStore messageStore) *publisher
- func NewQueue(params Params) (extqueue.Queue, error)
- func NewSubscriber(logger *zap.SugaredLogger, scope tally.Scope, messageStore messageStore, ...) *subscriber
- type DeliveryState
- type ErrAlreadyAcknowledged
- type ErrLeaseExpired
- type HookSignal
- type MockdeliveryStateStore
- func (m *MockdeliveryStateStore) AdvanceWatermark(ctx context.Context, consumerGroup, topic, partitionKey string, ...) (int64, error)
- func (m *MockdeliveryStateStore) EXPECT() *MockdeliveryStateStoreMockRecorder
- func (m *MockdeliveryStateStore) ExtendVisibility(ctx context.Context, consumerGroup, topic, partitionKey string, ...) error
- func (m *MockdeliveryStateStore) GetDeliveryState(ctx context.Context, consumerGroup, topic, partitionKey string, offset int64) (DeliveryState, bool, error)
- func (m *MockdeliveryStateStore) MarkAcked(ctx context.Context, consumerGroup, topic, partitionKey string, offset int64) error
- func (m *MockdeliveryStateStore) MarkDelivered(ctx context.Context, consumerGroup, topic, partitionKey string, ...) (int, error)
- func (m *MockdeliveryStateStore) MarkNacked(ctx context.Context, consumerGroup, topic, partitionKey string, ...) error
- type MockdeliveryStateStoreMockRecorder
- func (mr *MockdeliveryStateStoreMockRecorder) AdvanceWatermark(ctx, consumerGroup, topic, partitionKey, currentWatermark, offsets any) *gomock.Call
- func (mr *MockdeliveryStateStoreMockRecorder) ExtendVisibility(ctx, consumerGroup, topic, partitionKey, offset, visibilityTimeoutMs any) *gomock.Call
- func (mr *MockdeliveryStateStoreMockRecorder) GetDeliveryState(ctx, consumerGroup, topic, partitionKey, offset any) *gomock.Call
- func (mr *MockdeliveryStateStoreMockRecorder) MarkAcked(ctx, consumerGroup, topic, partitionKey, offset any) *gomock.Call
- func (mr *MockdeliveryStateStoreMockRecorder) MarkDelivered(ctx, consumerGroup, topic, partitionKey, offset, visibilityTimeoutMs any) *gomock.Call
- func (mr *MockdeliveryStateStoreMockRecorder) MarkNacked(ctx, consumerGroup, topic, partitionKey, offset, delayMs any) *gomock.Call
- type MockmessageStore
- func (m *MockmessageStore) Delete(ctx context.Context, topic, partitionKey, messageID string) error
- func (m *MockmessageStore) EXPECT() *MockmessageStoreMockRecorder
- func (m *MockmessageStore) FetchByOffset(ctx context.Context, topic, partitionKey string, currentOffset, nowMs int64, ...) ([]messageRow, error)
- func (m *MockmessageStore) GarbageCollect(ctx context.Context, topic, partitionKey string, minAckedOffset int64) (int64, error)
- func (m *MockmessageStore) GetOffsetsAbove(ctx context.Context, topic, partitionKey string, afterOffset int64, limit int) ([]int64, error)
- func (m *MockmessageStore) Insert(ctx context.Context, topic string, messages []messagequeue.Message) error
- func (m *MockmessageStore) InsertDelayed(ctx context.Context, topic string, messages []messagequeue.Message, ...) error
- func (m *MockmessageStore) MoveToDLQ(ctx context.Context, topic, partitionKey, messageID string, failureCount int, ...) error
- type MockmessageStoreMockRecorder
- func (mr *MockmessageStoreMockRecorder) Delete(ctx, topic, partitionKey, messageID any) *gomock.Call
- func (mr *MockmessageStoreMockRecorder) FetchByOffset(ctx, topic, partitionKey, currentOffset, nowMs, limit any) *gomock.Call
- func (mr *MockmessageStoreMockRecorder) GarbageCollect(ctx, topic, partitionKey, minAckedOffset any) *gomock.Call
- func (mr *MockmessageStoreMockRecorder) GetOffsetsAbove(ctx, topic, partitionKey, afterOffset, limit any) *gomock.Call
- func (mr *MockmessageStoreMockRecorder) Insert(ctx, topic, messages any) *gomock.Call
- func (mr *MockmessageStoreMockRecorder) InsertDelayed(ctx, topic, messages, visibleAfterMs any) *gomock.Call
- func (mr *MockmessageStoreMockRecorder) MoveToDLQ(...) *gomock.Call
- type MockoffsetStore
- func (m *MockoffsetStore) EXPECT() *MockoffsetStoreMockRecorder
- func (m *MockoffsetStore) GetAckedOffset(ctx context.Context, topic, partitionKey, consumerGroup string) (int64, error)
- func (m *MockoffsetStore) GetMinAckedOffset(ctx context.Context, topic, partitionKey string) (int64, bool, error)
- func (m *MockoffsetStore) Initialize(ctx context.Context, topic, partitionKey, consumerGroup string) error
- func (m *MockoffsetStore) UpdateAckedOffset(ctx context.Context, topic, partitionKey string, offset int64, ...) error
- type MockoffsetStoreMockRecorder
- func (mr *MockoffsetStoreMockRecorder) GetAckedOffset(ctx, topic, partitionKey, consumerGroup any) *gomock.Call
- func (mr *MockoffsetStoreMockRecorder) GetMinAckedOffset(ctx, topic, partitionKey any) *gomock.Call
- func (mr *MockoffsetStoreMockRecorder) Initialize(ctx, topic, partitionKey, consumerGroup any) *gomock.Call
- func (mr *MockoffsetStoreMockRecorder) UpdateAckedOffset(ctx, topic, partitionKey, offset, consumerGroup any) *gomock.Call
- type MockpartitionLeaseStore
- func (m *MockpartitionLeaseStore) DiscoverAndAcquirePartitions(ctx context.Context, topic, subscriberName, consumerGroup string, ...) (int, []string, error)
- func (m *MockpartitionLeaseStore) EXPECT() *MockpartitionLeaseStoreMockRecorder
- func (m *MockpartitionLeaseStore) GetLeasedPartitions(ctx context.Context, topic, subscriberName, consumerGroup string) ([]string, error)
- func (m *MockpartitionLeaseStore) ReleaseLease(ctx context.Context, topic, partitionKey, subscriberName, consumerGroup string) error
- func (m *MockpartitionLeaseStore) RenewLease(ctx context.Context, topic, partitionKey, subscriberName, consumerGroup string, ...) error
- func (m *MockpartitionLeaseStore) TryAcquireLease(ctx context.Context, topic, partitionKey, subscriberName, consumerGroup string, ...) (bool, error)
- type MockpartitionLeaseStoreMockRecorder
- func (mr *MockpartitionLeaseStoreMockRecorder) DiscoverAndAcquirePartitions(ctx, topic, subscriberName, consumerGroup, leaseDurationMs, maxPartitions any) *gomock.Call
- func (mr *MockpartitionLeaseStoreMockRecorder) GetLeasedPartitions(ctx, topic, subscriberName, consumerGroup any) *gomock.Call
- func (mr *MockpartitionLeaseStoreMockRecorder) ReleaseLease(ctx, topic, partitionKey, subscriberName, consumerGroup any) *gomock.Call
- func (mr *MockpartitionLeaseStoreMockRecorder) RenewLease(ctx, topic, partitionKey, subscriberName, consumerGroup, leaseDurationMs any) *gomock.Call
- func (mr *MockpartitionLeaseStoreMockRecorder) TryAcquireLease(ctx, topic, partitionKey, subscriberName, consumerGroup, leaseDurationMs any) *gomock.Call
- type MocksubscriberHeartbeatStore
- func (m *MocksubscriberHeartbeatStore) ActiveSubscribers(ctx context.Context, topic, consumerGroup string, staleDurationMs int64) ([]string, error)
- func (m *MocksubscriberHeartbeatStore) Deregister(ctx context.Context, topic, subscriberName, consumerGroup string) error
- func (m *MocksubscriberHeartbeatStore) EXPECT() *MocksubscriberHeartbeatStoreMockRecorder
- func (m *MocksubscriberHeartbeatStore) Heartbeat(ctx context.Context, topic, subscriberName, consumerGroup string) error
- type MocksubscriberHeartbeatStoreMockRecorder
- func (mr *MocksubscriberHeartbeatStoreMockRecorder) ActiveSubscribers(ctx, topic, consumerGroup, staleDurationMs any) *gomock.Call
- func (mr *MocksubscriberHeartbeatStoreMockRecorder) Deregister(ctx, topic, subscriberName, consumerGroup any) *gomock.Call
- func (mr *MocksubscriberHeartbeatStoreMockRecorder) Heartbeat(ctx, topic, subscriberName, consumerGroup any) *gomock.Call
- type Params
Constants ¶
const ( // Fixed table names for single-table design MessagesTableName = "queue_messages" PartitionLeasesTableName = "queue_partition_leases" OffsetsTableName = "queue_offsets" SubscriberHeartbeatsTableName = "queue_subscriber_heartbeats" DeliveryStateTableName = "queue_delivery_state" )
Variables ¶
var ErrPublisherClosed = errors.New("publisher is closed")
ErrPublisherClosed is returned when attempting to publish after the publisher has been closed. This is a graceful error, not a programming bug — concurrent goroutines may still hold references to the publisher when Close() is called, and their subsequent Publish calls return this error to signal they should stop.
var ErrSubscriberClosed = errors.New("subscriber is closed")
ErrSubscriberClosed is returned when attempting to subscribe after the subscriber has been closed.
Functions ¶
func NewPublisher ¶
func NewPublisher(logger *zap.SugaredLogger, scope tally.Scope, messageStore messageStore) *publisher
NewPublisher creates a publisher with the given dependencies
func NewSubscriber ¶
func NewSubscriber(logger *zap.SugaredLogger, scope tally.Scope, messageStore messageStore, offsetStore offsetStore, leaseStore partitionLeaseStore, heartbeatStore subscriberHeartbeatStore, deliveryStateStore deliveryStateStore) *subscriber
Types ¶
type DeliveryState ¶
type DeliveryState struct {
// Acked indicates whether this consumer group has processed the message
Acked bool
// InvisibleUntil is the epoch milliseconds until which the message is hidden
InvisibleUntil int64
// RetryCount tracks how many times the message has been delivered
RetryCount int
}
DeliveryState represents the full per-message delivery tracking state.
type ErrAlreadyAcknowledged ¶
type ErrAlreadyAcknowledged struct {
DeliveryID string
}
ErrAlreadyAcknowledged is returned when attempting to ack/nack a delivery that was already processed
func (*ErrAlreadyAcknowledged) Error ¶
func (e *ErrAlreadyAcknowledged) Error() string
type ErrLeaseExpired ¶
type ErrLeaseExpired struct {
// Topic is the topic the lease was for.
Topic string
// PartitionKey is the partition the lease was for.
PartitionKey string
}
ErrLeaseExpired is returned when a lease renewal fails because the lease is no longer owned by this worker (rows affected == 0).
func (*ErrLeaseExpired) Error ¶
func (e *ErrLeaseExpired) Error() string
type HookSignal ¶
type HookSignal int
HookSignal identifies the type of subscriber lifecycle event. Named after behavioral concerns (what happened) rather than implementation details (which loop ran), so signal names remain stable across refactors.
const ( // SignalDeliveryCheck is sent after the subscriber checks a partition for // deliverable messages (including watermark advancement). SignalDeliveryCheck HookSignal = iota // SignalPartitionUpdate is sent after the subscriber evaluates partition // ownership (discovery, rebalance, lease renewal, heartbeat). SignalPartitionUpdate )
type MockdeliveryStateStore ¶
type MockdeliveryStateStore struct {
// contains filtered or unexported fields
}
MockdeliveryStateStore is a mock of deliveryStateStore interface.
func NewMockdeliveryStateStore ¶
func NewMockdeliveryStateStore(ctrl *gomock.Controller) *MockdeliveryStateStore
NewMockdeliveryStateStore creates a new mock instance.
func (*MockdeliveryStateStore) AdvanceWatermark ¶
func (m *MockdeliveryStateStore) AdvanceWatermark(ctx context.Context, consumerGroup, topic, partitionKey string, currentWatermark int64, offsets []int64) (int64, error)
AdvanceWatermark mocks base method.
func (*MockdeliveryStateStore) EXPECT ¶
func (m *MockdeliveryStateStore) EXPECT() *MockdeliveryStateStoreMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockdeliveryStateStore) ExtendVisibility ¶
func (m *MockdeliveryStateStore) ExtendVisibility(ctx context.Context, consumerGroup, topic, partitionKey string, offset, visibilityTimeoutMs int64) error
ExtendVisibility mocks base method.
func (*MockdeliveryStateStore) GetDeliveryState ¶
func (m *MockdeliveryStateStore) GetDeliveryState(ctx context.Context, consumerGroup, topic, partitionKey string, offset int64) (DeliveryState, bool, error)
GetDeliveryState mocks base method.
func (*MockdeliveryStateStore) MarkAcked ¶
func (m *MockdeliveryStateStore) MarkAcked(ctx context.Context, consumerGroup, topic, partitionKey string, offset int64) error
MarkAcked mocks base method.
func (*MockdeliveryStateStore) MarkDelivered ¶
func (m *MockdeliveryStateStore) MarkDelivered(ctx context.Context, consumerGroup, topic, partitionKey string, offset, visibilityTimeoutMs int64) (int, error)
MarkDelivered mocks base method.
func (*MockdeliveryStateStore) MarkNacked ¶
func (m *MockdeliveryStateStore) MarkNacked(ctx context.Context, consumerGroup, topic, partitionKey string, offset, delayMs int64) error
MarkNacked mocks base method.
type MockdeliveryStateStoreMockRecorder ¶
type MockdeliveryStateStoreMockRecorder struct {
// contains filtered or unexported fields
}
MockdeliveryStateStoreMockRecorder is the mock recorder for MockdeliveryStateStore.
func (*MockdeliveryStateStoreMockRecorder) AdvanceWatermark ¶
func (mr *MockdeliveryStateStoreMockRecorder) AdvanceWatermark(ctx, consumerGroup, topic, partitionKey, currentWatermark, offsets any) *gomock.Call
AdvanceWatermark indicates an expected call of AdvanceWatermark.
func (*MockdeliveryStateStoreMockRecorder) ExtendVisibility ¶
func (mr *MockdeliveryStateStoreMockRecorder) ExtendVisibility(ctx, consumerGroup, topic, partitionKey, offset, visibilityTimeoutMs any) *gomock.Call
ExtendVisibility indicates an expected call of ExtendVisibility.
func (*MockdeliveryStateStoreMockRecorder) GetDeliveryState ¶
func (mr *MockdeliveryStateStoreMockRecorder) GetDeliveryState(ctx, consumerGroup, topic, partitionKey, offset any) *gomock.Call
GetDeliveryState indicates an expected call of GetDeliveryState.
func (*MockdeliveryStateStoreMockRecorder) MarkAcked ¶
func (mr *MockdeliveryStateStoreMockRecorder) MarkAcked(ctx, consumerGroup, topic, partitionKey, offset any) *gomock.Call
MarkAcked indicates an expected call of MarkAcked.
func (*MockdeliveryStateStoreMockRecorder) MarkDelivered ¶
func (mr *MockdeliveryStateStoreMockRecorder) MarkDelivered(ctx, consumerGroup, topic, partitionKey, offset, visibilityTimeoutMs any) *gomock.Call
MarkDelivered indicates an expected call of MarkDelivered.
func (*MockdeliveryStateStoreMockRecorder) MarkNacked ¶
func (mr *MockdeliveryStateStoreMockRecorder) MarkNacked(ctx, consumerGroup, topic, partitionKey, offset, delayMs any) *gomock.Call
MarkNacked indicates an expected call of MarkNacked.
type MockmessageStore ¶
type MockmessageStore struct {
// contains filtered or unexported fields
}
MockmessageStore is a mock of messageStore interface.
func NewMockmessageStore ¶
func NewMockmessageStore(ctrl *gomock.Controller) *MockmessageStore
NewMockmessageStore creates a new mock instance.
func (*MockmessageStore) Delete ¶
func (m *MockmessageStore) Delete(ctx context.Context, topic, partitionKey, messageID string) error
Delete mocks base method.
func (*MockmessageStore) EXPECT ¶
func (m *MockmessageStore) EXPECT() *MockmessageStoreMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockmessageStore) FetchByOffset ¶
func (m *MockmessageStore) FetchByOffset(ctx context.Context, topic, partitionKey string, currentOffset, nowMs int64, limit int) ([]messageRow, error)
FetchByOffset mocks base method.
func (*MockmessageStore) GarbageCollect ¶
func (m *MockmessageStore) GarbageCollect(ctx context.Context, topic, partitionKey string, minAckedOffset int64) (int64, error)
GarbageCollect mocks base method.
func (*MockmessageStore) GetOffsetsAbove ¶
func (m *MockmessageStore) GetOffsetsAbove(ctx context.Context, topic, partitionKey string, afterOffset int64, limit int) ([]int64, error)
GetOffsetsAbove mocks base method.
func (*MockmessageStore) Insert ¶
func (m *MockmessageStore) Insert(ctx context.Context, topic string, messages []messagequeue.Message) error
Insert mocks base method.
func (*MockmessageStore) InsertDelayed ¶
func (m *MockmessageStore) InsertDelayed(ctx context.Context, topic string, messages []messagequeue.Message, visibleAfterMs int64) error
InsertDelayed mocks base method.
type MockmessageStoreMockRecorder ¶
type MockmessageStoreMockRecorder struct {
// contains filtered or unexported fields
}
MockmessageStoreMockRecorder is the mock recorder for MockmessageStore.
func (*MockmessageStoreMockRecorder) Delete ¶
func (mr *MockmessageStoreMockRecorder) Delete(ctx, topic, partitionKey, messageID any) *gomock.Call
Delete indicates an expected call of Delete.
func (*MockmessageStoreMockRecorder) FetchByOffset ¶
func (mr *MockmessageStoreMockRecorder) FetchByOffset(ctx, topic, partitionKey, currentOffset, nowMs, limit any) *gomock.Call
FetchByOffset indicates an expected call of FetchByOffset.
func (*MockmessageStoreMockRecorder) GarbageCollect ¶
func (mr *MockmessageStoreMockRecorder) GarbageCollect(ctx, topic, partitionKey, minAckedOffset any) *gomock.Call
GarbageCollect indicates an expected call of GarbageCollect.
func (*MockmessageStoreMockRecorder) GetOffsetsAbove ¶
func (mr *MockmessageStoreMockRecorder) GetOffsetsAbove(ctx, topic, partitionKey, afterOffset, limit any) *gomock.Call
GetOffsetsAbove indicates an expected call of GetOffsetsAbove.
func (*MockmessageStoreMockRecorder) Insert ¶
func (mr *MockmessageStoreMockRecorder) Insert(ctx, topic, messages any) *gomock.Call
Insert indicates an expected call of Insert.
func (*MockmessageStoreMockRecorder) InsertDelayed ¶
func (mr *MockmessageStoreMockRecorder) InsertDelayed(ctx, topic, messages, visibleAfterMs any) *gomock.Call
InsertDelayed indicates an expected call of InsertDelayed.
type MockoffsetStore ¶
type MockoffsetStore struct {
// contains filtered or unexported fields
}
MockoffsetStore is a mock of offsetStore interface.
func NewMockoffsetStore ¶
func NewMockoffsetStore(ctrl *gomock.Controller) *MockoffsetStore
NewMockoffsetStore creates a new mock instance.
func (*MockoffsetStore) EXPECT ¶
func (m *MockoffsetStore) EXPECT() *MockoffsetStoreMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockoffsetStore) GetAckedOffset ¶
func (m *MockoffsetStore) GetAckedOffset(ctx context.Context, topic, partitionKey, consumerGroup string) (int64, error)
GetAckedOffset mocks base method.
func (*MockoffsetStore) GetMinAckedOffset ¶
func (m *MockoffsetStore) GetMinAckedOffset(ctx context.Context, topic, partitionKey string) (int64, bool, error)
GetMinAckedOffset mocks base method.
func (*MockoffsetStore) Initialize ¶
func (m *MockoffsetStore) Initialize(ctx context.Context, topic, partitionKey, consumerGroup string) error
Initialize mocks base method.
func (*MockoffsetStore) UpdateAckedOffset ¶
func (m *MockoffsetStore) UpdateAckedOffset(ctx context.Context, topic, partitionKey string, offset int64, consumerGroup string) error
UpdateAckedOffset mocks base method.
type MockoffsetStoreMockRecorder ¶
type MockoffsetStoreMockRecorder struct {
// contains filtered or unexported fields
}
MockoffsetStoreMockRecorder is the mock recorder for MockoffsetStore.
func (*MockoffsetStoreMockRecorder) GetAckedOffset ¶
func (mr *MockoffsetStoreMockRecorder) GetAckedOffset(ctx, topic, partitionKey, consumerGroup any) *gomock.Call
GetAckedOffset indicates an expected call of GetAckedOffset.
func (*MockoffsetStoreMockRecorder) GetMinAckedOffset ¶
func (mr *MockoffsetStoreMockRecorder) GetMinAckedOffset(ctx, topic, partitionKey any) *gomock.Call
GetMinAckedOffset indicates an expected call of GetMinAckedOffset.
func (*MockoffsetStoreMockRecorder) Initialize ¶
func (mr *MockoffsetStoreMockRecorder) Initialize(ctx, topic, partitionKey, consumerGroup any) *gomock.Call
Initialize indicates an expected call of Initialize.
func (*MockoffsetStoreMockRecorder) UpdateAckedOffset ¶
func (mr *MockoffsetStoreMockRecorder) UpdateAckedOffset(ctx, topic, partitionKey, offset, consumerGroup any) *gomock.Call
UpdateAckedOffset indicates an expected call of UpdateAckedOffset.
type MockpartitionLeaseStore ¶
type MockpartitionLeaseStore struct {
// contains filtered or unexported fields
}
MockpartitionLeaseStore is a mock of partitionLeaseStore interface.
func NewMockpartitionLeaseStore ¶
func NewMockpartitionLeaseStore(ctrl *gomock.Controller) *MockpartitionLeaseStore
NewMockpartitionLeaseStore creates a new mock instance.
func (*MockpartitionLeaseStore) DiscoverAndAcquirePartitions ¶
func (m *MockpartitionLeaseStore) DiscoverAndAcquirePartitions(ctx context.Context, topic, subscriberName, consumerGroup string, leaseDurationMs int64, maxPartitions int) (int, []string, error)
DiscoverAndAcquirePartitions mocks base method.
func (*MockpartitionLeaseStore) EXPECT ¶
func (m *MockpartitionLeaseStore) EXPECT() *MockpartitionLeaseStoreMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockpartitionLeaseStore) GetLeasedPartitions ¶
func (m *MockpartitionLeaseStore) GetLeasedPartitions(ctx context.Context, topic, subscriberName, consumerGroup string) ([]string, error)
GetLeasedPartitions mocks base method.
func (*MockpartitionLeaseStore) ReleaseLease ¶
func (m *MockpartitionLeaseStore) ReleaseLease(ctx context.Context, topic, partitionKey, subscriberName, consumerGroup string) error
ReleaseLease mocks base method.
func (*MockpartitionLeaseStore) RenewLease ¶
func (m *MockpartitionLeaseStore) RenewLease(ctx context.Context, topic, partitionKey, subscriberName, consumerGroup string, leaseDurationMs int64) error
RenewLease mocks base method.
func (*MockpartitionLeaseStore) TryAcquireLease ¶
func (m *MockpartitionLeaseStore) TryAcquireLease(ctx context.Context, topic, partitionKey, subscriberName, consumerGroup string, leaseDurationMs int64) (bool, error)
TryAcquireLease mocks base method.
type MockpartitionLeaseStoreMockRecorder ¶
type MockpartitionLeaseStoreMockRecorder struct {
// contains filtered or unexported fields
}
MockpartitionLeaseStoreMockRecorder is the mock recorder for MockpartitionLeaseStore.
func (*MockpartitionLeaseStoreMockRecorder) DiscoverAndAcquirePartitions ¶
func (mr *MockpartitionLeaseStoreMockRecorder) DiscoverAndAcquirePartitions(ctx, topic, subscriberName, consumerGroup, leaseDurationMs, maxPartitions any) *gomock.Call
DiscoverAndAcquirePartitions indicates an expected call of DiscoverAndAcquirePartitions.
func (*MockpartitionLeaseStoreMockRecorder) GetLeasedPartitions ¶
func (mr *MockpartitionLeaseStoreMockRecorder) GetLeasedPartitions(ctx, topic, subscriberName, consumerGroup any) *gomock.Call
GetLeasedPartitions indicates an expected call of GetLeasedPartitions.
func (*MockpartitionLeaseStoreMockRecorder) ReleaseLease ¶
func (mr *MockpartitionLeaseStoreMockRecorder) ReleaseLease(ctx, topic, partitionKey, subscriberName, consumerGroup any) *gomock.Call
ReleaseLease indicates an expected call of ReleaseLease.
func (*MockpartitionLeaseStoreMockRecorder) RenewLease ¶
func (mr *MockpartitionLeaseStoreMockRecorder) RenewLease(ctx, topic, partitionKey, subscriberName, consumerGroup, leaseDurationMs any) *gomock.Call
RenewLease indicates an expected call of RenewLease.
func (*MockpartitionLeaseStoreMockRecorder) TryAcquireLease ¶
func (mr *MockpartitionLeaseStoreMockRecorder) TryAcquireLease(ctx, topic, partitionKey, subscriberName, consumerGroup, leaseDurationMs any) *gomock.Call
TryAcquireLease indicates an expected call of TryAcquireLease.
type MocksubscriberHeartbeatStore ¶
type MocksubscriberHeartbeatStore struct {
// contains filtered or unexported fields
}
MocksubscriberHeartbeatStore is a mock of subscriberHeartbeatStore interface.
func NewMocksubscriberHeartbeatStore ¶
func NewMocksubscriberHeartbeatStore(ctrl *gomock.Controller) *MocksubscriberHeartbeatStore
NewMocksubscriberHeartbeatStore creates a new mock instance.
func (*MocksubscriberHeartbeatStore) ActiveSubscribers ¶
func (m *MocksubscriberHeartbeatStore) ActiveSubscribers(ctx context.Context, topic, consumerGroup string, staleDurationMs int64) ([]string, error)
ActiveSubscribers mocks base method.
func (*MocksubscriberHeartbeatStore) Deregister ¶
func (m *MocksubscriberHeartbeatStore) Deregister(ctx context.Context, topic, subscriberName, consumerGroup string) error
Deregister mocks base method.
func (*MocksubscriberHeartbeatStore) EXPECT ¶
func (m *MocksubscriberHeartbeatStore) EXPECT() *MocksubscriberHeartbeatStoreMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MocksubscriberHeartbeatStoreMockRecorder ¶
type MocksubscriberHeartbeatStoreMockRecorder struct {
// contains filtered or unexported fields
}
MocksubscriberHeartbeatStoreMockRecorder is the mock recorder for MocksubscriberHeartbeatStore.
func (*MocksubscriberHeartbeatStoreMockRecorder) ActiveSubscribers ¶
func (mr *MocksubscriberHeartbeatStoreMockRecorder) ActiveSubscribers(ctx, topic, consumerGroup, staleDurationMs any) *gomock.Call
ActiveSubscribers indicates an expected call of ActiveSubscribers.
func (*MocksubscriberHeartbeatStoreMockRecorder) Deregister ¶
func (mr *MocksubscriberHeartbeatStoreMockRecorder) Deregister(ctx, topic, subscriberName, consumerGroup any) *gomock.Call
Deregister indicates an expected call of Deregister.
type Params ¶
type Params struct {
// DB is the database connection (required)
DB *sql.DB
// Logger for debugging and observability (required)
Logger *zap.Logger
// MetricsScope for metrics collection (required)
MetricsScope tally.Scope
// OnSignal receives typed subscriber lifecycle signals (HookSignal).
// Nil in production; used by integration tests for event-driven waits.
OnSignal chan HookSignal
}
Params holds dependencies for creating a SQL queue