provider

package
v0.28.0 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2020 License: MIT Imports: 8 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrUnknownScheme is the error for unknown archiver scheme
	ErrUnknownScheme = errors.New("unknown archiver scheme")
	// ErrNotSupported is the error for not supported archiver implementation
	ErrNotSupported = errors.New("archiver provider not supported")
	// ErrBootstrapContainerNotFound is the error for unable to find the bootstrap container given serviceName
	ErrBootstrapContainerNotFound = errors.New("unable to find bootstrap container for the given service name")
	// ErrArchiverConfigNotFound is the error for unable to find the config for an archiver given scheme
	ErrArchiverConfigNotFound = errors.New("unable to find archiver config for the given scheme")
	// ErrBootstrapContainerAlreadyRegistered is the error for registering multiple containers for the same serviceName
	ErrBootstrapContainerAlreadyRegistered = errors.New("bootstrap container has already been registered")
)

Functions

This section is empty.

Types

type ArchiverProvider added in v0.7.0

type ArchiverProvider interface {
	RegisterBootstrapContainer(
		serviceName string,
		historyContainer *archiver.HistoryBootstrapContainer,
		visibilityContainter *archiver.VisibilityBootstrapContainer,
	) error
	GetHistoryArchiver(scheme, serviceName string) (archiver.HistoryArchiver, error)
	GetVisibilityArchiver(scheme, serviceName string) (archiver.VisibilityArchiver, error)
}

ArchiverProvider returns history or visibility archiver based on the scheme and serviceName. The archiver for each combination of scheme and serviceName will be created only once and cached.

func NewArchiverProvider

func NewArchiverProvider(
	historyArchiverConfigs *config.HistoryArchiverProvider,
	visibilityArchiverConfigs *config.VisibilityArchiverProvider,
) ArchiverProvider

NewArchiverProvider returns a new Archiver provider

type MockArchiverProvider added in v0.7.0

type MockArchiverProvider struct {
	mock.Mock
}

MockArchiverProvider is an autogenerated mock type for the ArchiverProvider type

func (*MockArchiverProvider) GetHistoryArchiver added in v0.7.0

func (_m *MockArchiverProvider) GetHistoryArchiver(scheme string, serviceName string) (archiver.HistoryArchiver, error)

GetHistoryArchiver provides a mock function with given fields: scheme, serviceName

func (*MockArchiverProvider) GetVisibilityArchiver added in v0.7.0

func (_m *MockArchiverProvider) GetVisibilityArchiver(scheme string, serviceName string) (archiver.VisibilityArchiver, error)

GetVisibilityArchiver provides a mock function with given fields: scheme, serviceName

func (*MockArchiverProvider) RegisterBootstrapContainer added in v0.7.0

func (_m *MockArchiverProvider) RegisterBootstrapContainer(serviceName string, historyContainer *archiver.HistoryBootstrapContainer, visibilityContainter *archiver.VisibilityBootstrapContainer) error

RegisterBootstrapContainer provides a mock function with given fields: serviceName, historyContainer, visibilityContainter

Jump to

Keyboard shortcuts

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