failover

package
v1.2.13-prerelease10 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2024 License: MIT Imports: 19 Imported by: 0

Documentation

Overview

Package failover is a generated GoMock package.

Package failover is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Coordinator

type Coordinator interface {
	common.Daemon

	NotifyFailoverMarkers(shardID int32, markers []*types.FailoverMarkerAttributes)
	ReceiveFailoverMarkers(shardIDs []int32, marker *types.FailoverMarkerAttributes)
	GetFailoverInfo(domainID string) (*types.GetFailoverInfoResponse, error)
}

Coordinator manages the failover markers on sending and receiving

func NewCoordinator

func NewCoordinator(
	domainManager persistence.DomainManager,
	historyClient history.Client,
	timeSource clock.TimeSource,
	domainCache cache.DomainCache,
	config *config.Config,
	metricsClient metrics.Client,
	logger log.Logger,
) Coordinator

NewCoordinator initialize a failover coordinator

type MarkerNotifier

type MarkerNotifier interface {
	common.Daemon
}

MarkerNotifier notifies failover markers to the remote failover coordinator

func NewMarkerNotifier

func NewMarkerNotifier(
	shard shard.Context,
	config *config.Config,
	failoverCoordinator Coordinator,
) MarkerNotifier

NewMarkerNotifier creates a new instance of failover marker notifier

type MockCoordinator

type MockCoordinator struct {
	// contains filtered or unexported fields
}

MockCoordinator is a mock of Coordinator interface.

func NewMockCoordinator

func NewMockCoordinator(ctrl *gomock.Controller) *MockCoordinator

NewMockCoordinator creates a new mock instance.

func (*MockCoordinator) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockCoordinator) GetFailoverInfo added in v0.24.0

func (m *MockCoordinator) GetFailoverInfo(domainID string) (*types.GetFailoverInfoResponse, error)

GetFailoverInfo mocks base method.

func (*MockCoordinator) NotifyFailoverMarkers

func (m *MockCoordinator) NotifyFailoverMarkers(shardID int32, markers []*types.FailoverMarkerAttributes)

NotifyFailoverMarkers mocks base method.

func (*MockCoordinator) ReceiveFailoverMarkers

func (m *MockCoordinator) ReceiveFailoverMarkers(shardIDs []int32, marker *types.FailoverMarkerAttributes)

ReceiveFailoverMarkers mocks base method.

func (*MockCoordinator) Start

func (m *MockCoordinator) Start()

Start mocks base method.

func (*MockCoordinator) Stop

func (m *MockCoordinator) Stop()

Stop mocks base method.

type MockCoordinatorMockRecorder

type MockCoordinatorMockRecorder struct {
	// contains filtered or unexported fields
}

MockCoordinatorMockRecorder is the mock recorder for MockCoordinator.

func (*MockCoordinatorMockRecorder) GetFailoverInfo added in v0.24.0

func (mr *MockCoordinatorMockRecorder) GetFailoverInfo(domainID interface{}) *gomock.Call

GetFailoverInfo indicates an expected call of GetFailoverInfo.

func (*MockCoordinatorMockRecorder) NotifyFailoverMarkers

func (mr *MockCoordinatorMockRecorder) NotifyFailoverMarkers(shardID, markers interface{}) *gomock.Call

NotifyFailoverMarkers indicates an expected call of NotifyFailoverMarkers.

func (*MockCoordinatorMockRecorder) ReceiveFailoverMarkers

func (mr *MockCoordinatorMockRecorder) ReceiveFailoverMarkers(shardIDs, marker interface{}) *gomock.Call

ReceiveFailoverMarkers indicates an expected call of ReceiveFailoverMarkers.

func (*MockCoordinatorMockRecorder) Start

Start indicates an expected call of Start.

func (*MockCoordinatorMockRecorder) Stop

Stop indicates an expected call of Stop.

type MockMarkerNotifier

type MockMarkerNotifier struct {
	// contains filtered or unexported fields
}

MockMarkerNotifier is a mock of MarkerNotifier interface.

func NewMockMarkerNotifier

func NewMockMarkerNotifier(ctrl *gomock.Controller) *MockMarkerNotifier

NewMockMarkerNotifier creates a new mock instance.

func (*MockMarkerNotifier) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockMarkerNotifier) Start

func (m *MockMarkerNotifier) Start()

Start mocks base method.

func (*MockMarkerNotifier) Stop

func (m *MockMarkerNotifier) Stop()

Stop mocks base method.

type MockMarkerNotifierMockRecorder

type MockMarkerNotifierMockRecorder struct {
	// contains filtered or unexported fields
}

MockMarkerNotifierMockRecorder is the mock recorder for MockMarkerNotifier.

func (*MockMarkerNotifierMockRecorder) Start

Start indicates an expected call of Start.

func (*MockMarkerNotifierMockRecorder) Stop

Stop indicates an expected call of Stop.

Jump to

Keyboard shortcuts

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