Documentation ¶
Overview ¶
Package domain is a generated GoMock package.
Package domain is a generated GoMock package.
Package domain is a generated GoMock package.
Index ¶
- Constants
- Variables
- type ArchivalEvent
- type ArchivalState
- type AttrValidatorImpl
- type DLQMessageHandler
- type Handler
- type HandlerImpl
- func (d *HandlerImpl) DeprecateDomain(ctx context.Context, deprecateRequest *shared.DeprecateDomainRequest) error
- func (d *HandlerImpl) DescribeDomain(ctx context.Context, describeRequest *shared.DescribeDomainRequest) (*shared.DescribeDomainResponse, error)
- func (d *HandlerImpl) ListDomains(ctx context.Context, listRequest *shared.ListDomainsRequest) (*shared.ListDomainsResponse, error)
- func (d *HandlerImpl) RegisterDomain(ctx context.Context, registerRequest *shared.RegisterDomainRequest) error
- func (d *HandlerImpl) UpdateDomain(ctx context.Context, updateRequest *shared.UpdateDomainRequest) (*shared.UpdateDomainResponse, error)
- type MockDLQMessageHandler
- func (m *MockDLQMessageHandler) EXPECT() *MockDLQMessageHandlerMockRecorder
- func (m *MockDLQMessageHandler) Merge(lastMessageID int64, pageSize int, pageToken []byte) ([]byte, error)
- func (m *MockDLQMessageHandler) Purge(lastMessageID int64) error
- func (m *MockDLQMessageHandler) Read(lastMessageID int64, pageSize int, pageToken []byte) ([]*replicator.ReplicationTask, []byte, error)
- type MockDLQMessageHandlerMockRecorder
- func (mr *MockDLQMessageHandlerMockRecorder) Merge(lastMessageID, pageSize, pageToken interface{}) *gomock.Call
- func (mr *MockDLQMessageHandlerMockRecorder) Purge(lastMessageID interface{}) *gomock.Call
- func (mr *MockDLQMessageHandlerMockRecorder) Read(lastMessageID, pageSize, pageToken interface{}) *gomock.Call
- type MockHandler
- func (m *MockHandler) DeprecateDomain(ctx context.Context, deprecateRequest *shared.DeprecateDomainRequest) error
- func (m *MockHandler) DescribeDomain(ctx context.Context, describeRequest *shared.DescribeDomainRequest) (*shared.DescribeDomainResponse, error)
- func (m *MockHandler) EXPECT() *MockHandlerMockRecorder
- func (m *MockHandler) ListDomains(ctx context.Context, listRequest *shared.ListDomainsRequest) (*shared.ListDomainsResponse, error)
- func (m *MockHandler) RegisterDomain(ctx context.Context, registerRequest *shared.RegisterDomainRequest) error
- func (m *MockHandler) UpdateDomain(ctx context.Context, updateRequest *shared.UpdateDomainRequest) (*shared.UpdateDomainResponse, 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) UpdateDomain(ctx, updateRequest interface{}) *gomock.Call
- type MockReplicationTaskExecutor
- type MockReplicationTaskExecutorMockRecorder
- type ReplicationTaskExecutor
- type Replicator
Constants ¶
const ( // MinRetentionDays is the minimal retention days for any domain MinRetentionDays = 1 // MaxBadBinaries is the maximal number of bad client binaries stored in a domain MaxBadBinaries = 10 )
Variables ¶
var ( // ErrEmptyDomainReplicationTask is the error to indicate empty replication task ErrEmptyDomainReplicationTask = &shared.BadRequestError{Message: "empty domain replication task"} // ErrInvalidDomainOperation is the error to indicate empty domain operation attribute ErrInvalidDomainOperation = &shared.BadRequestError{Message: "invalid domain operation attribute"} // ErrInvalidDomainID is the error to indicate empty rID attribute ErrInvalidDomainID = &shared.BadRequestError{Message: "invalid domain ID attribute"} // ErrInvalidDomainInfo is the error to indicate empty info attribute ErrInvalidDomainInfo = &shared.BadRequestError{Message: "invalid domain info attribute"} // ErrInvalidDomainConfig is the error to indicate empty config attribute ErrInvalidDomainConfig = &shared.BadRequestError{Message: "invalid domain config attribute"} // ErrInvalidDomainReplicationConfig is the error to indicate empty replication config attribute ErrInvalidDomainReplicationConfig = &shared.BadRequestError{Message: "invalid domain replication config attribute"} // ErrInvalidDomainConfigVersion is the error to indicate empty config version attribute ErrInvalidDomainConfigVersion = &shared.BadRequestError{Message: "invalid domain config version attribute"} // ErrInvalidDomainFailoverVersion is the error to indicate empty failover version attribute ErrInvalidDomainFailoverVersion = &shared.BadRequestError{Message: "invalid domain failover version attribute"} // ErrInvalidDomainStatus is the error to indicate invalid domain status ErrInvalidDomainStatus = &shared.BadRequestError{Message: "invalid domain status attribute"} // ErrNameUUIDCollision is the error to indicate domain name / UUID collision ErrNameUUIDCollision = &shared.BadRequestError{Message: "domain replication encounter name / UUID collision"} )
Functions ¶
This section is empty.
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 shared.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 DLQMessageHandler ¶ added in v0.12.0
type DLQMessageHandler interface { Read(lastMessageID int64, pageSize int, pageToken []byte) ([]*replicator.ReplicationTask, []byte, error) Purge(lastMessageID int64) error Merge(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, domainReplicationQueue persistence.DomainReplicationQueue, logger log.Logger, ) DLQMessageHandler
NewDLQMessageHandler returns a DLQTaskHandler instance
type Handler ¶
type Handler interface { DeprecateDomain( ctx context.Context, deprecateRequest *shared.DeprecateDomainRequest, ) error DescribeDomain( ctx context.Context, describeRequest *shared.DescribeDomainRequest, ) (*shared.DescribeDomainResponse, error) ListDomains( ctx context.Context, listRequest *shared.ListDomainsRequest, ) (*shared.ListDomainsResponse, error) RegisterDomain( ctx context.Context, registerRequest *shared.RegisterDomainRequest, ) error UpdateDomain( ctx context.Context, updateRequest *shared.UpdateDomainRequest, ) (*shared.UpdateDomainResponse, error) }
Handler is the domain operation handler
type HandlerImpl ¶
type HandlerImpl struct {
// contains filtered or unexported fields
}
HandlerImpl is the domain operation handler implementation
func NewHandler ¶
func NewHandler( minRetentionDays int, maxBadBinaryCount dynamicconfig.IntPropertyFnWithDomainFilter, logger log.Logger, metadataMgr persistence.MetadataManager, clusterMetadata cluster.Metadata, domainReplicator Replicator, archivalMetadata archiver.ArchivalMetadata, archiverProvider provider.ArchiverProvider, ) *HandlerImpl
NewHandler create a new domain handler
func (*HandlerImpl) DeprecateDomain ¶
func (d *HandlerImpl) DeprecateDomain( ctx context.Context, deprecateRequest *shared.DeprecateDomainRequest, ) error
DeprecateDomain deprecates a domain
func (*HandlerImpl) DescribeDomain ¶
func (d *HandlerImpl) DescribeDomain( ctx context.Context, describeRequest *shared.DescribeDomainRequest, ) (*shared.DescribeDomainResponse, error)
DescribeDomain describe the domain
func (*HandlerImpl) ListDomains ¶
func (d *HandlerImpl) ListDomains( ctx context.Context, listRequest *shared.ListDomainsRequest, ) (*shared.ListDomainsResponse, error)
ListDomains list all domains
func (*HandlerImpl) RegisterDomain ¶
func (d *HandlerImpl) RegisterDomain( ctx context.Context, registerRequest *shared.RegisterDomainRequest, ) error
RegisterDomain register a new domain
func (*HandlerImpl) UpdateDomain ¶
func (d *HandlerImpl) UpdateDomain( ctx context.Context, updateRequest *shared.UpdateDomainRequest, ) (*shared.UpdateDomainResponse, error)
UpdateDomain update the domain
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(lastMessageID int64, pageSize int, pageToken []byte) ([]byte, error)
Merge mocks base method
func (*MockDLQMessageHandler) Purge ¶ added in v0.12.0
func (m *MockDLQMessageHandler) Purge(lastMessageID int64) error
Purge mocks base method
func (*MockDLQMessageHandler) Read ¶ added in v0.12.0
func (m *MockDLQMessageHandler) Read(lastMessageID int64, pageSize int, pageToken []byte) ([]*replicator.ReplicationTask, []byte, error)
Read 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) Merge ¶ added in v0.12.0
func (mr *MockDLQMessageHandlerMockRecorder) Merge(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(lastMessageID interface{}) *gomock.Call
Purge indicates an expected call of Purge
func (*MockDLQMessageHandlerMockRecorder) Read ¶ added in v0.12.0
func (mr *MockDLQMessageHandlerMockRecorder) Read(lastMessageID, pageSize, pageToken interface{}) *gomock.Call
Read indicates an expected call of Read
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 *shared.DeprecateDomainRequest) error
DeprecateDomain mocks base method
func (*MockHandler) DescribeDomain ¶ added in v0.11.0
func (m *MockHandler) DescribeDomain(ctx context.Context, describeRequest *shared.DescribeDomainRequest) (*shared.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 *shared.ListDomainsRequest) (*shared.ListDomainsResponse, error)
ListDomains mocks base method
func (*MockHandler) RegisterDomain ¶ added in v0.11.0
func (m *MockHandler) RegisterDomain(ctx context.Context, registerRequest *shared.RegisterDomainRequest) error
RegisterDomain mocks base method
func (*MockHandler) UpdateDomain ¶ added in v0.11.0
func (m *MockHandler) UpdateDomain(ctx context.Context, updateRequest *shared.UpdateDomainRequest) (*shared.UpdateDomainResponse, error)
UpdateDomain 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) UpdateDomain ¶ added in v0.11.0
func (mr *MockHandlerMockRecorder) UpdateDomain(ctx, updateRequest interface{}) *gomock.Call
UpdateDomain indicates an expected call of UpdateDomain
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 *replicator.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 ReplicationTaskExecutor ¶ added in v0.12.0
type ReplicationTaskExecutor interface {
Execute(task *replicator.DomainTaskAttributes) error
}
ReplicationTaskExecutor is the interface which is to execute domain replication task
func NewReplicationTaskExecutor ¶ added in v0.12.0
func NewReplicationTaskExecutor( metadataManagerV2 persistence.MetadataManager, logger log.Logger, ) ReplicationTaskExecutor
NewReplicationTaskExecutor create a new instance of domain replicator
type Replicator ¶
type Replicator interface { HandleTransmissionTask(domainOperation replicator.DomainOperation, info *persistence.DomainInfo, config *persistence.DomainConfig, replicationConfig *persistence.DomainReplicationConfig, configVersion int64, failoverVersion 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