domain

package
v0.10.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 3, 2019 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
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

View Source
var (
	// ErrInvalidDomainStatus is the error to indicate invalid domain status
	ErrInvalidDomainStatus = errors.New("invalid domain status attribute")
)

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL