Documentation ¶
Overview ¶
Package domain is a generated GoMock package.
Package domain is a generated GoMock package.
Package domain is a generated GoMock package.
Package domain is a generated GoMock package.
Package domain is a generated GoMock package.
Package domain is a generated GoMock package.
Index ¶
- Variables
- func CleanPendingActiveState(domainManager persistence.DomainManager, domainID string, ...) error
- type ArchivalEvent
- type ArchivalState
- type AttrValidatorImpl
- type Config
- type DLQMessageHandler
- type FailoverWatcher
- type Handler
- type MockDLQMessageHandler
- func (m *MockDLQMessageHandler) Count(ctx context.Context, forceFetch bool) (int64, error)
- func (m *MockDLQMessageHandler) EXPECT() *MockDLQMessageHandlerMockRecorder
- func (m *MockDLQMessageHandler) Merge(ctx context.Context, lastMessageID int64, pageSize int, pageToken []byte) ([]byte, error)
- func (m *MockDLQMessageHandler) Purge(ctx context.Context, lastMessageID int64) error
- func (m *MockDLQMessageHandler) Read(ctx context.Context, lastMessageID int64, pageSize int, pageToken []byte) ([]*types.ReplicationTask, []byte, error)
- func (m *MockDLQMessageHandler) Start()
- func (m *MockDLQMessageHandler) Stop()
- type MockDLQMessageHandlerMockRecorder
- func (mr *MockDLQMessageHandlerMockRecorder) Count(ctx, forceFetch interface{}) *gomock.Call
- func (mr *MockDLQMessageHandlerMockRecorder) Merge(ctx, lastMessageID, pageSize, pageToken interface{}) *gomock.Call
- func (mr *MockDLQMessageHandlerMockRecorder) Purge(ctx, lastMessageID interface{}) *gomock.Call
- func (mr *MockDLQMessageHandlerMockRecorder) Read(ctx, lastMessageID, pageSize, pageToken interface{}) *gomock.Call
- func (mr *MockDLQMessageHandlerMockRecorder) Start() *gomock.Call
- func (mr *MockDLQMessageHandlerMockRecorder) Stop() *gomock.Call
- type MockFailoverWatcher
- type MockFailoverWatcherMockRecorder
- type MockHandler
- func (m *MockHandler) DeprecateDomain(ctx context.Context, deprecateRequest *types.DeprecateDomainRequest) error
- func (m *MockHandler) DescribeDomain(ctx context.Context, describeRequest *types.DescribeDomainRequest) (*types.DescribeDomainResponse, error)
- func (m *MockHandler) EXPECT() *MockHandlerMockRecorder
- func (m *MockHandler) ListDomains(ctx context.Context, listRequest *types.ListDomainsRequest) (*types.ListDomainsResponse, error)
- func (m *MockHandler) RegisterDomain(ctx context.Context, registerRequest *types.RegisterDomainRequest) error
- func (m *MockHandler) UpdateAsyncWorkflowConfiguraton(ctx context.Context, ...) error
- func (m *MockHandler) UpdateDomain(ctx context.Context, updateRequest *types.UpdateDomainRequest) (*types.UpdateDomainResponse, error)
- func (m *MockHandler) UpdateIsolationGroups(ctx context.Context, updateRequest types.UpdateDomainIsolationGroupsRequest) error
- type MockHandlerMockRecorder
- func (mr *MockHandlerMockRecorder) DeprecateDomain(ctx, deprecateRequest interface{}) *gomock.Call
- func (mr *MockHandlerMockRecorder) DescribeDomain(ctx, describeRequest interface{}) *gomock.Call
- func (mr *MockHandlerMockRecorder) ListDomains(ctx, listRequest interface{}) *gomock.Call
- func (mr *MockHandlerMockRecorder) RegisterDomain(ctx, registerRequest interface{}) *gomock.Call
- func (mr *MockHandlerMockRecorder) UpdateAsyncWorkflowConfiguraton(ctx, updateRequest interface{}) *gomock.Call
- func (mr *MockHandlerMockRecorder) UpdateDomain(ctx, updateRequest interface{}) *gomock.Call
- func (mr *MockHandlerMockRecorder) UpdateIsolationGroups(ctx, updateRequest interface{}) *gomock.Call
- type MockReplicationQueue
- func (m *MockReplicationQueue) DeleteMessageFromDLQ(ctx context.Context, messageID int64) error
- func (m *MockReplicationQueue) EXPECT() *MockReplicationQueueMockRecorder
- func (m *MockReplicationQueue) GetAckLevels(ctx context.Context) (map[string]int64, error)
- func (m *MockReplicationQueue) GetDLQAckLevel(ctx context.Context) (int64, error)
- func (m *MockReplicationQueue) GetDLQSize(ctx context.Context) (int64, error)
- func (m *MockReplicationQueue) GetMessagesFromDLQ(ctx context.Context, firstMessageID, lastMessageID int64, pageSize int, ...) ([]*types.ReplicationTask, []byte, error)
- func (m *MockReplicationQueue) GetReplicationMessages(ctx context.Context, lastMessageID int64, maxCount int) ([]*types.ReplicationTask, int64, error)
- func (m *MockReplicationQueue) Publish(ctx context.Context, message interface{}) error
- func (m *MockReplicationQueue) PublishToDLQ(ctx context.Context, message interface{}) error
- func (m *MockReplicationQueue) RangeDeleteMessagesFromDLQ(ctx context.Context, firstMessageID, lastMessageID int64) error
- func (m *MockReplicationQueue) Start()
- func (m *MockReplicationQueue) Stop()
- func (m *MockReplicationQueue) UpdateAckLevel(ctx context.Context, lastProcessedMessageID int64, clusterName string) error
- func (m *MockReplicationQueue) UpdateDLQAckLevel(ctx context.Context, lastProcessedMessageID int64) error
- type MockReplicationQueueMockRecorder
- func (mr *MockReplicationQueueMockRecorder) DeleteMessageFromDLQ(ctx, messageID interface{}) *gomock.Call
- func (mr *MockReplicationQueueMockRecorder) GetAckLevels(ctx interface{}) *gomock.Call
- func (mr *MockReplicationQueueMockRecorder) GetDLQAckLevel(ctx interface{}) *gomock.Call
- func (mr *MockReplicationQueueMockRecorder) GetDLQSize(ctx interface{}) *gomock.Call
- func (mr *MockReplicationQueueMockRecorder) GetMessagesFromDLQ(ctx, firstMessageID, lastMessageID, pageSize, pageToken interface{}) *gomock.Call
- func (mr *MockReplicationQueueMockRecorder) GetReplicationMessages(ctx, lastMessageID, maxCount interface{}) *gomock.Call
- func (mr *MockReplicationQueueMockRecorder) Publish(ctx, message interface{}) *gomock.Call
- func (mr *MockReplicationQueueMockRecorder) PublishToDLQ(ctx, message interface{}) *gomock.Call
- func (mr *MockReplicationQueueMockRecorder) RangeDeleteMessagesFromDLQ(ctx, firstMessageID, lastMessageID interface{}) *gomock.Call
- func (mr *MockReplicationQueueMockRecorder) Start() *gomock.Call
- func (mr *MockReplicationQueueMockRecorder) Stop() *gomock.Call
- func (mr *MockReplicationQueueMockRecorder) UpdateAckLevel(ctx, lastProcessedMessageID, clusterName interface{}) *gomock.Call
- func (mr *MockReplicationQueueMockRecorder) UpdateDLQAckLevel(ctx, lastProcessedMessageID interface{}) *gomock.Call
- type MockReplicationTaskExecutor
- type MockReplicationTaskExecutorMockRecorder
- type MockReplicator
- type MockReplicatorMockRecorder
- type ReplicationQueue
- type ReplicationTaskExecutor
- type Replicator
Constants ¶
This section is empty.
Variables ¶
var ( // ErrEmptyDomainReplicationTask is the error to indicate empty replication task ErrEmptyDomainReplicationTask = &types.BadRequestError{Message: "empty domain replication task"} // ErrInvalidDomainOperation is the error to indicate empty domain operation attribute ErrInvalidDomainOperation = &types.BadRequestError{Message: "invalid domain operation attribute"} // ErrInvalidDomainID is the error to indicate empty rID attribute ErrInvalidDomainID = &types.BadRequestError{Message: "invalid domain ID attribute"} // ErrInvalidDomainInfo is the error to indicate empty info attribute ErrInvalidDomainInfo = &types.BadRequestError{Message: "invalid domain info attribute"} // ErrInvalidDomainConfig is the error to indicate empty config attribute ErrInvalidDomainConfig = &types.BadRequestError{Message: "invalid domain config attribute"} // ErrInvalidDomainReplicationConfig is the error to indicate empty replication config attribute ErrInvalidDomainReplicationConfig = &types.BadRequestError{Message: "invalid domain replication config attribute"} // ErrInvalidDomainStatus is the error to indicate invalid domain status ErrInvalidDomainStatus = &types.BadRequestError{Message: "invalid domain status attribute"} // ErrNameUUIDCollision is the error to indicate domain name / UUID collision ErrNameUUIDCollision = &types.BadRequestError{Message: "domain replication encounter name / UUID collision"} )
Functions ¶
func CleanPendingActiveState ¶ added in v0.14.0
func CleanPendingActiveState( domainManager persistence.DomainManager, domainID string, failoverVersion int64, policy backoff.RetryPolicy, ) error
CleanPendingActiveState removes the pending active state from the domain
Types ¶
type ArchivalEvent ¶
type ArchivalEvent struct { URI string // contains filtered or unexported fields }
ArchivalEvent represents a change request to archival config state the only restriction placed on events is that defaultURI is not empty status can be nil, enabled, or disabled (nil indicates no update by user is being attempted)
type ArchivalState ¶
type ArchivalState struct { Status types.ArchivalStatus URI string }
ArchivalState represents the state of archival config the only invalid state is {URI="", status=enabled} once URI is set it is immutable
type AttrValidatorImpl ¶
type AttrValidatorImpl struct {
// contains filtered or unexported fields
}
AttrValidatorImpl is domain attr validator
type Config ¶ added in v0.16.0
type Config struct { MinRetentionDays dynamicconfig.IntPropertyFn MaxRetentionDays dynamicconfig.IntPropertyFn RequiredDomainDataKeys dynamicconfig.MapPropertyFn MaxBadBinaryCount dynamicconfig.IntPropertyFnWithDomainFilter FailoverCoolDown dynamicconfig.DurationPropertyFnWithDomainFilter }
Config is the domain config for domain handler
type DLQMessageHandler ¶ added in v0.12.0
type DLQMessageHandler interface { common.Daemon Count(ctx context.Context, forceFetch bool) (int64, error) Read(ctx context.Context, lastMessageID int64, pageSize int, pageToken []byte) ([]*types.ReplicationTask, []byte, error) Purge(ctx context.Context, lastMessageID int64) error Merge(ctx context.Context, lastMessageID int64, pageSize int, pageToken []byte) ([]byte, error) }
DLQMessageHandler is the interface handles domain DLQ messages
func NewDLQMessageHandler ¶ added in v0.12.0
func NewDLQMessageHandler( replicationHandler ReplicationTaskExecutor, replicationQueue ReplicationQueue, logger log.Logger, metricsClient metrics.Client, timeSource clock.TimeSource, ) DLQMessageHandler
NewDLQMessageHandler returns a DLQTaskHandler instance
type FailoverWatcher ¶ added in v0.14.0
FailoverWatcher handles failover operation on domain entities
func NewFailoverWatcher ¶ added in v0.14.0
func NewFailoverWatcher( domainCache cache.DomainCache, domainManager persistence.DomainManager, timeSource clock.TimeSource, refreshInterval dynamicconfig.DurationPropertyFn, refreshJitter dynamicconfig.FloatPropertyFn, metricsClient metrics.Client, logger log.Logger, ) FailoverWatcher
NewFailoverWatcher initializes domain failover processor
type Handler ¶
type Handler interface { DeprecateDomain( ctx context.Context, deprecateRequest *types.DeprecateDomainRequest, ) error DescribeDomain( ctx context.Context, describeRequest *types.DescribeDomainRequest, ) (*types.DescribeDomainResponse, error) ListDomains( ctx context.Context, listRequest *types.ListDomainsRequest, ) (*types.ListDomainsResponse, error) RegisterDomain( ctx context.Context, registerRequest *types.RegisterDomainRequest, ) error UpdateDomain( ctx context.Context, updateRequest *types.UpdateDomainRequest, ) (*types.UpdateDomainResponse, error) UpdateIsolationGroups( ctx context.Context, updateRequest types.UpdateDomainIsolationGroupsRequest, ) error UpdateAsyncWorkflowConfiguraton( ctx context.Context, updateRequest types.UpdateDomainAsyncWorkflowConfiguratonRequest, ) error }
Handler is the domain operation handler
func NewHandler ¶
func NewHandler( config Config, logger log.Logger, domainManager persistence.DomainManager, clusterMetadata cluster.Metadata, domainReplicator Replicator, archivalMetadata archiver.ArchivalMetadata, archiverProvider provider.ArchiverProvider, timeSource clock.TimeSource, ) Handler
NewHandler create a new domain handler
type MockDLQMessageHandler ¶ added in v0.12.0
type MockDLQMessageHandler struct {
// contains filtered or unexported fields
}
MockDLQMessageHandler is a mock of DLQMessageHandler interface.
func NewMockDLQMessageHandler ¶ added in v0.12.0
func NewMockDLQMessageHandler(ctrl *gomock.Controller) *MockDLQMessageHandler
NewMockDLQMessageHandler creates a new mock instance.
func (*MockDLQMessageHandler) EXPECT ¶ added in v0.12.0
func (m *MockDLQMessageHandler) EXPECT() *MockDLQMessageHandlerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockDLQMessageHandler) Merge ¶ added in v0.12.0
func (m *MockDLQMessageHandler) Merge(ctx context.Context, lastMessageID int64, pageSize int, pageToken []byte) ([]byte, error)
Merge mocks base method.
func (*MockDLQMessageHandler) Purge ¶ added in v0.12.0
func (m *MockDLQMessageHandler) Purge(ctx context.Context, lastMessageID int64) error
Purge mocks base method.
func (*MockDLQMessageHandler) Read ¶ added in v0.12.0
func (m *MockDLQMessageHandler) Read(ctx context.Context, lastMessageID int64, pageSize int, pageToken []byte) ([]*types.ReplicationTask, []byte, error)
Read mocks base method.
func (*MockDLQMessageHandler) Start ¶ added in v0.25.0
func (m *MockDLQMessageHandler) Start()
Start mocks base method.
func (*MockDLQMessageHandler) Stop ¶ added in v0.25.0
func (m *MockDLQMessageHandler) Stop()
Stop mocks base method.
type MockDLQMessageHandlerMockRecorder ¶ added in v0.12.0
type MockDLQMessageHandlerMockRecorder struct {
// contains filtered or unexported fields
}
MockDLQMessageHandlerMockRecorder is the mock recorder for MockDLQMessageHandler.
func (*MockDLQMessageHandlerMockRecorder) Count ¶ added in v0.25.0
func (mr *MockDLQMessageHandlerMockRecorder) Count(ctx, forceFetch interface{}) *gomock.Call
Count indicates an expected call of Count.
func (*MockDLQMessageHandlerMockRecorder) Merge ¶ added in v0.12.0
func (mr *MockDLQMessageHandlerMockRecorder) Merge(ctx, lastMessageID, pageSize, pageToken interface{}) *gomock.Call
Merge indicates an expected call of Merge.
func (*MockDLQMessageHandlerMockRecorder) Purge ¶ added in v0.12.0
func (mr *MockDLQMessageHandlerMockRecorder) Purge(ctx, lastMessageID interface{}) *gomock.Call
Purge indicates an expected call of Purge.
func (*MockDLQMessageHandlerMockRecorder) Read ¶ added in v0.12.0
func (mr *MockDLQMessageHandlerMockRecorder) Read(ctx, lastMessageID, pageSize, pageToken interface{}) *gomock.Call
Read indicates an expected call of Read.
func (*MockDLQMessageHandlerMockRecorder) Start ¶ added in v0.25.0
func (mr *MockDLQMessageHandlerMockRecorder) Start() *gomock.Call
Start indicates an expected call of Start.
func (*MockDLQMessageHandlerMockRecorder) Stop ¶ added in v0.25.0
func (mr *MockDLQMessageHandlerMockRecorder) Stop() *gomock.Call
Stop indicates an expected call of Stop.
type MockFailoverWatcher ¶ added in v0.14.0
type MockFailoverWatcher struct {
// contains filtered or unexported fields
}
MockFailoverWatcher is a mock of FailoverWatcher interface.
func NewMockFailoverWatcher ¶ added in v0.14.0
func NewMockFailoverWatcher(ctrl *gomock.Controller) *MockFailoverWatcher
NewMockFailoverWatcher creates a new mock instance.
func (*MockFailoverWatcher) EXPECT ¶ added in v0.14.0
func (m *MockFailoverWatcher) EXPECT() *MockFailoverWatcherMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockFailoverWatcher) Start ¶ added in v0.14.0
func (m *MockFailoverWatcher) Start()
Start mocks base method.
func (*MockFailoverWatcher) Stop ¶ added in v0.14.0
func (m *MockFailoverWatcher) Stop()
Stop mocks base method.
type MockFailoverWatcherMockRecorder ¶ added in v0.14.0
type MockFailoverWatcherMockRecorder struct {
// contains filtered or unexported fields
}
MockFailoverWatcherMockRecorder is the mock recorder for MockFailoverWatcher.
func (*MockFailoverWatcherMockRecorder) Start ¶ added in v0.14.0
func (mr *MockFailoverWatcherMockRecorder) Start() *gomock.Call
Start indicates an expected call of Start.
func (*MockFailoverWatcherMockRecorder) Stop ¶ added in v0.14.0
func (mr *MockFailoverWatcherMockRecorder) Stop() *gomock.Call
Stop indicates an expected call of Stop.
type MockHandler ¶ added in v0.11.0
type MockHandler struct {
// contains filtered or unexported fields
}
MockHandler is a mock of Handler interface.
func NewMockHandler ¶ added in v0.11.0
func NewMockHandler(ctrl *gomock.Controller) *MockHandler
NewMockHandler creates a new mock instance.
func (*MockHandler) DeprecateDomain ¶ added in v0.11.0
func (m *MockHandler) DeprecateDomain(ctx context.Context, deprecateRequest *types.DeprecateDomainRequest) error
DeprecateDomain mocks base method.
func (*MockHandler) DescribeDomain ¶ added in v0.11.0
func (m *MockHandler) DescribeDomain(ctx context.Context, describeRequest *types.DescribeDomainRequest) (*types.DescribeDomainResponse, error)
DescribeDomain mocks base method.
func (*MockHandler) EXPECT ¶ added in v0.11.0
func (m *MockHandler) EXPECT() *MockHandlerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockHandler) ListDomains ¶ added in v0.11.0
func (m *MockHandler) ListDomains(ctx context.Context, listRequest *types.ListDomainsRequest) (*types.ListDomainsResponse, error)
ListDomains mocks base method.
func (*MockHandler) RegisterDomain ¶ added in v0.11.0
func (m *MockHandler) RegisterDomain(ctx context.Context, registerRequest *types.RegisterDomainRequest) error
RegisterDomain mocks base method.
func (*MockHandler) UpdateAsyncWorkflowConfiguraton ¶ added in v1.2.8
func (m *MockHandler) UpdateAsyncWorkflowConfiguraton(ctx context.Context, updateRequest types.UpdateDomainAsyncWorkflowConfiguratonRequest) error
UpdateAsyncWorkflowConfiguraton mocks base method.
func (*MockHandler) UpdateDomain ¶ added in v0.11.0
func (m *MockHandler) UpdateDomain(ctx context.Context, updateRequest *types.UpdateDomainRequest) (*types.UpdateDomainResponse, error)
UpdateDomain mocks base method.
func (*MockHandler) UpdateIsolationGroups ¶ added in v1.2.1
func (m *MockHandler) UpdateIsolationGroups(ctx context.Context, updateRequest types.UpdateDomainIsolationGroupsRequest) error
UpdateIsolationGroups mocks base method.
type MockHandlerMockRecorder ¶ added in v0.11.0
type MockHandlerMockRecorder struct {
// contains filtered or unexported fields
}
MockHandlerMockRecorder is the mock recorder for MockHandler.
func (*MockHandlerMockRecorder) DeprecateDomain ¶ added in v0.11.0
func (mr *MockHandlerMockRecorder) DeprecateDomain(ctx, deprecateRequest interface{}) *gomock.Call
DeprecateDomain indicates an expected call of DeprecateDomain.
func (*MockHandlerMockRecorder) DescribeDomain ¶ added in v0.11.0
func (mr *MockHandlerMockRecorder) DescribeDomain(ctx, describeRequest interface{}) *gomock.Call
DescribeDomain indicates an expected call of DescribeDomain.
func (*MockHandlerMockRecorder) ListDomains ¶ added in v0.11.0
func (mr *MockHandlerMockRecorder) ListDomains(ctx, listRequest interface{}) *gomock.Call
ListDomains indicates an expected call of ListDomains.
func (*MockHandlerMockRecorder) RegisterDomain ¶ added in v0.11.0
func (mr *MockHandlerMockRecorder) RegisterDomain(ctx, registerRequest interface{}) *gomock.Call
RegisterDomain indicates an expected call of RegisterDomain.
func (*MockHandlerMockRecorder) UpdateAsyncWorkflowConfiguraton ¶ added in v1.2.8
func (mr *MockHandlerMockRecorder) UpdateAsyncWorkflowConfiguraton(ctx, updateRequest interface{}) *gomock.Call
UpdateAsyncWorkflowConfiguraton indicates an expected call of UpdateAsyncWorkflowConfiguraton.
func (*MockHandlerMockRecorder) UpdateDomain ¶ added in v0.11.0
func (mr *MockHandlerMockRecorder) UpdateDomain(ctx, updateRequest interface{}) *gomock.Call
UpdateDomain indicates an expected call of UpdateDomain.
func (*MockHandlerMockRecorder) UpdateIsolationGroups ¶ added in v1.2.1
func (mr *MockHandlerMockRecorder) UpdateIsolationGroups(ctx, updateRequest interface{}) *gomock.Call
UpdateIsolationGroups indicates an expected call of UpdateIsolationGroups.
type MockReplicationQueue ¶ added in v0.17.0
type MockReplicationQueue struct {
// contains filtered or unexported fields
}
MockReplicationQueue is a mock of ReplicationQueue interface.
func NewMockReplicationQueue ¶ added in v0.17.0
func NewMockReplicationQueue(ctrl *gomock.Controller) *MockReplicationQueue
NewMockReplicationQueue creates a new mock instance.
func (*MockReplicationQueue) DeleteMessageFromDLQ ¶ added in v0.17.0
func (m *MockReplicationQueue) DeleteMessageFromDLQ(ctx context.Context, messageID int64) error
DeleteMessageFromDLQ mocks base method.
func (*MockReplicationQueue) EXPECT ¶ added in v0.17.0
func (m *MockReplicationQueue) EXPECT() *MockReplicationQueueMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockReplicationQueue) GetAckLevels ¶ added in v0.17.0
GetAckLevels mocks base method.
func (*MockReplicationQueue) GetDLQAckLevel ¶ added in v0.17.0
func (m *MockReplicationQueue) GetDLQAckLevel(ctx context.Context) (int64, error)
GetDLQAckLevel mocks base method.
func (*MockReplicationQueue) GetDLQSize ¶ added in v0.25.0
func (m *MockReplicationQueue) GetDLQSize(ctx context.Context) (int64, error)
GetDLQSize mocks base method.
func (*MockReplicationQueue) GetMessagesFromDLQ ¶ added in v0.17.0
func (m *MockReplicationQueue) GetMessagesFromDLQ(ctx context.Context, firstMessageID, lastMessageID int64, pageSize int, pageToken []byte) ([]*types.ReplicationTask, []byte, error)
GetMessagesFromDLQ mocks base method.
func (*MockReplicationQueue) GetReplicationMessages ¶ added in v0.17.0
func (m *MockReplicationQueue) GetReplicationMessages(ctx context.Context, lastMessageID int64, maxCount int) ([]*types.ReplicationTask, int64, error)
GetReplicationMessages mocks base method.
func (*MockReplicationQueue) Publish ¶ added in v0.17.0
func (m *MockReplicationQueue) Publish(ctx context.Context, message interface{}) error
Publish mocks base method.
func (*MockReplicationQueue) PublishToDLQ ¶ added in v0.17.0
func (m *MockReplicationQueue) PublishToDLQ(ctx context.Context, message interface{}) error
PublishToDLQ mocks base method.
func (*MockReplicationQueue) RangeDeleteMessagesFromDLQ ¶ added in v0.17.0
func (m *MockReplicationQueue) RangeDeleteMessagesFromDLQ(ctx context.Context, firstMessageID, lastMessageID int64) error
RangeDeleteMessagesFromDLQ mocks base method.
func (*MockReplicationQueue) Start ¶ added in v0.17.0
func (m *MockReplicationQueue) Start()
Start mocks base method.
func (*MockReplicationQueue) Stop ¶ added in v0.17.0
func (m *MockReplicationQueue) Stop()
Stop mocks base method.
func (*MockReplicationQueue) UpdateAckLevel ¶ added in v0.17.0
func (m *MockReplicationQueue) UpdateAckLevel(ctx context.Context, lastProcessedMessageID int64, clusterName string) error
UpdateAckLevel mocks base method.
func (*MockReplicationQueue) UpdateDLQAckLevel ¶ added in v0.17.0
func (m *MockReplicationQueue) UpdateDLQAckLevel(ctx context.Context, lastProcessedMessageID int64) error
UpdateDLQAckLevel mocks base method.
type MockReplicationQueueMockRecorder ¶ added in v0.17.0
type MockReplicationQueueMockRecorder struct {
// contains filtered or unexported fields
}
MockReplicationQueueMockRecorder is the mock recorder for MockReplicationQueue.
func (*MockReplicationQueueMockRecorder) DeleteMessageFromDLQ ¶ added in v0.17.0
func (mr *MockReplicationQueueMockRecorder) DeleteMessageFromDLQ(ctx, messageID interface{}) *gomock.Call
DeleteMessageFromDLQ indicates an expected call of DeleteMessageFromDLQ.
func (*MockReplicationQueueMockRecorder) GetAckLevels ¶ added in v0.17.0
func (mr *MockReplicationQueueMockRecorder) GetAckLevels(ctx interface{}) *gomock.Call
GetAckLevels indicates an expected call of GetAckLevels.
func (*MockReplicationQueueMockRecorder) GetDLQAckLevel ¶ added in v0.17.0
func (mr *MockReplicationQueueMockRecorder) GetDLQAckLevel(ctx interface{}) *gomock.Call
GetDLQAckLevel indicates an expected call of GetDLQAckLevel.
func (*MockReplicationQueueMockRecorder) GetDLQSize ¶ added in v0.25.0
func (mr *MockReplicationQueueMockRecorder) GetDLQSize(ctx interface{}) *gomock.Call
GetDLQSize indicates an expected call of GetDLQSize.
func (*MockReplicationQueueMockRecorder) GetMessagesFromDLQ ¶ added in v0.17.0
func (mr *MockReplicationQueueMockRecorder) GetMessagesFromDLQ(ctx, firstMessageID, lastMessageID, pageSize, pageToken interface{}) *gomock.Call
GetMessagesFromDLQ indicates an expected call of GetMessagesFromDLQ.
func (*MockReplicationQueueMockRecorder) GetReplicationMessages ¶ added in v0.17.0
func (mr *MockReplicationQueueMockRecorder) GetReplicationMessages(ctx, lastMessageID, maxCount interface{}) *gomock.Call
GetReplicationMessages indicates an expected call of GetReplicationMessages.
func (*MockReplicationQueueMockRecorder) Publish ¶ added in v0.17.0
func (mr *MockReplicationQueueMockRecorder) Publish(ctx, message interface{}) *gomock.Call
Publish indicates an expected call of Publish.
func (*MockReplicationQueueMockRecorder) PublishToDLQ ¶ added in v0.17.0
func (mr *MockReplicationQueueMockRecorder) PublishToDLQ(ctx, message interface{}) *gomock.Call
PublishToDLQ indicates an expected call of PublishToDLQ.
func (*MockReplicationQueueMockRecorder) RangeDeleteMessagesFromDLQ ¶ added in v0.17.0
func (mr *MockReplicationQueueMockRecorder) RangeDeleteMessagesFromDLQ(ctx, firstMessageID, lastMessageID interface{}) *gomock.Call
RangeDeleteMessagesFromDLQ indicates an expected call of RangeDeleteMessagesFromDLQ.
func (*MockReplicationQueueMockRecorder) Start ¶ added in v0.17.0
func (mr *MockReplicationQueueMockRecorder) Start() *gomock.Call
Start indicates an expected call of Start.
func (*MockReplicationQueueMockRecorder) Stop ¶ added in v0.17.0
func (mr *MockReplicationQueueMockRecorder) Stop() *gomock.Call
Stop indicates an expected call of Stop.
func (*MockReplicationQueueMockRecorder) UpdateAckLevel ¶ added in v0.17.0
func (mr *MockReplicationQueueMockRecorder) UpdateAckLevel(ctx, lastProcessedMessageID, clusterName interface{}) *gomock.Call
UpdateAckLevel indicates an expected call of UpdateAckLevel.
func (*MockReplicationQueueMockRecorder) UpdateDLQAckLevel ¶ added in v0.17.0
func (mr *MockReplicationQueueMockRecorder) UpdateDLQAckLevel(ctx, lastProcessedMessageID interface{}) *gomock.Call
UpdateDLQAckLevel indicates an expected call of UpdateDLQAckLevel.
type MockReplicationTaskExecutor ¶ added in v0.12.0
type MockReplicationTaskExecutor struct {
// contains filtered or unexported fields
}
MockReplicationTaskExecutor is a mock of ReplicationTaskExecutor interface.
func NewMockReplicationTaskExecutor ¶ added in v0.12.0
func NewMockReplicationTaskExecutor(ctrl *gomock.Controller) *MockReplicationTaskExecutor
NewMockReplicationTaskExecutor creates a new mock instance.
func (*MockReplicationTaskExecutor) EXPECT ¶ added in v0.12.0
func (m *MockReplicationTaskExecutor) EXPECT() *MockReplicationTaskExecutorMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockReplicationTaskExecutor) Execute ¶ added in v0.12.0
func (m *MockReplicationTaskExecutor) Execute(task *types.DomainTaskAttributes) error
Execute mocks base method.
type MockReplicationTaskExecutorMockRecorder ¶ added in v0.12.0
type MockReplicationTaskExecutorMockRecorder struct {
// contains filtered or unexported fields
}
MockReplicationTaskExecutorMockRecorder is the mock recorder for MockReplicationTaskExecutor.
func (*MockReplicationTaskExecutorMockRecorder) Execute ¶ added in v0.12.0
func (mr *MockReplicationTaskExecutorMockRecorder) Execute(task interface{}) *gomock.Call
Execute indicates an expected call of Execute.
type MockReplicator ¶ added in v1.2.9
type MockReplicator struct {
// contains filtered or unexported fields
}
MockReplicator is a mock of Replicator interface.
func NewMockReplicator ¶ added in v1.2.9
func NewMockReplicator(ctrl *gomock.Controller) *MockReplicator
NewMockReplicator creates a new mock instance.
func (*MockReplicator) EXPECT ¶ added in v1.2.9
func (m *MockReplicator) EXPECT() *MockReplicatorMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockReplicator) HandleTransmissionTask ¶ added in v1.2.9
func (m *MockReplicator) HandleTransmissionTask(ctx context.Context, domainOperation types.DomainOperation, info *persistence.DomainInfo, config *persistence.DomainConfig, replicationConfig *persistence.DomainReplicationConfig, configVersion, failoverVersion, previousFailoverVersion int64, isGlobalDomainEnabled bool) error
HandleTransmissionTask mocks base method.
type MockReplicatorMockRecorder ¶ added in v1.2.9
type MockReplicatorMockRecorder struct {
// contains filtered or unexported fields
}
MockReplicatorMockRecorder is the mock recorder for MockReplicator.
func (*MockReplicatorMockRecorder) HandleTransmissionTask ¶ added in v1.2.9
func (mr *MockReplicatorMockRecorder) HandleTransmissionTask(ctx, domainOperation, info, config, replicationConfig, configVersion, failoverVersion, previousFailoverVersion, isGlobalDomainEnabled interface{}) *gomock.Call
HandleTransmissionTask indicates an expected call of HandleTransmissionTask.
type ReplicationQueue ¶ added in v0.17.0
type ReplicationQueue interface { common.Daemon Publish(ctx context.Context, message interface{}) error PublishToDLQ(ctx context.Context, message interface{}) error GetReplicationMessages(ctx context.Context, lastMessageID int64, maxCount int) ([]*types.ReplicationTask, int64, error) UpdateAckLevel(ctx context.Context, lastProcessedMessageID int64, clusterName string) error GetAckLevels(ctx context.Context) (map[string]int64, error) GetMessagesFromDLQ(ctx context.Context, firstMessageID int64, lastMessageID int64, pageSize int, pageToken []byte) ([]*types.ReplicationTask, []byte, error) UpdateDLQAckLevel(ctx context.Context, lastProcessedMessageID int64) error GetDLQAckLevel(ctx context.Context) (int64, error) RangeDeleteMessagesFromDLQ(ctx context.Context, firstMessageID int64, lastMessageID int64) error DeleteMessageFromDLQ(ctx context.Context, messageID int64) error GetDLQSize(ctx context.Context) (int64, error) }
ReplicationQueue is used to publish and list domain replication tasks
func NewReplicationQueue ¶ added in v0.17.0
func NewReplicationQueue( queue persistence.QueueManager, clusterName string, metricsClient metrics.Client, logger log.Logger, ) ReplicationQueue
NewReplicationQueue creates a new ReplicationQueue instance
type ReplicationTaskExecutor ¶ added in v0.12.0
type ReplicationTaskExecutor interface {
Execute(task *types.DomainTaskAttributes) error
}
ReplicationTaskExecutor is the interface which is to execute domain replication task
func NewReplicationTaskExecutor ¶ added in v0.12.0
func NewReplicationTaskExecutor( domainManager persistence.DomainManager, timeSource clock.TimeSource, logger log.Logger, ) ReplicationTaskExecutor
NewReplicationTaskExecutor create a new instance of domain replicator
type Replicator ¶
type Replicator interface { HandleTransmissionTask( ctx context.Context, domainOperation types.DomainOperation, info *persistence.DomainInfo, config *persistence.DomainConfig, replicationConfig *persistence.DomainReplicationConfig, configVersion int64, failoverVersion int64, previousFailoverVersion int64, isGlobalDomainEnabled bool, ) error }
Replicator is the interface which can replicate the domain
func NewDomainReplicator ¶
func NewDomainReplicator(replicationMessageSink messaging.Producer, logger log.Logger) Replicator
NewDomainReplicator create a new instance of domain replicator
Source Files ¶
- archivalConfigStateMachine.go
- attrValidator.go
- dlq_message_handler.go
- dlq_message_handler_mock.go
- errors.go
- failover_watcher.go
- failover_watcher_mock.go
- handler.go
- handler_mock.go
- replicationTaskExecutor.go
- replicationTaskHandler_mock.go
- replication_queue.go
- replication_queue_mock.go
- transmissionTaskHandler.go
- transmissionTaskHandler_mock.go