mrmanager

package
v0.23.0 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Overview

Package mrmanager is a generated GoMock package.

Index

Constants

View Source
const (
	DefaultInitialMRConnectRetryCount   = -1
	DefaultInitialMRConnectRetryBackoff = 100 * time.Millisecond
	DefaultMRConnTimeout                = 1 * time.Second
	DefaultMRCallTimeout                = 3 * time.Second
)
View Source
const (
	RPCAddrsFetchRetryInterval = 100 * time.Millisecond
)
View Source
const (
	ReloadInterval = time.Second
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ClusterMetadataView

type ClusterMetadataView interface {
	// ClusterMetadata returns the latest metadata of the cluster.
	ClusterMetadata(ctx context.Context) (*varlogpb.MetadataDescriptor, error)

	// StorageNode returns the storage node corresponded with the storageNodeID.
	StorageNode(ctx context.Context, storageNodeID types.StorageNodeID) (*varlogpb.StorageNodeDescriptor, error)
}

ClusterMetadataView provides the latest metadata about the cluster.

type ClusterMetadataViewGetter

type ClusterMetadataViewGetter interface {
	ClusterMetadataView() ClusterMetadataView
}

type MetadataRepositoryManager

type MetadataRepositoryManager interface {
	ClusterMetadataViewGetter
	io.Closer

	RegisterStorageNode(ctx context.Context, storageNodeMeta *varlogpb.StorageNodeDescriptor) error

	UnregisterStorageNode(ctx context.Context, storageNodeID types.StorageNodeID) error

	RegisterTopic(ctx context.Context, topicID types.TopicID) error

	UnregisterTopic(ctx context.Context, topicID types.TopicID) error

	RegisterLogStream(ctx context.Context, logStreamDesc *varlogpb.LogStreamDescriptor) error

	UnregisterLogStream(ctx context.Context, logStreamID types.LogStreamID) error

	UpdateLogStream(ctx context.Context, logStreamDesc *varlogpb.LogStreamDescriptor) error

	// Seal seals logstream corresponded with the logStreamID. It marks the logstream in the
	// cluster metadata stored in MR  as sealed. It returns the last committed GLSN that is
	// confirmed by MR.
	Seal(ctx context.Context, logStreamID types.LogStreamID) (lastCommittedGLSN types.GLSN, err error)

	Unseal(ctx context.Context, logStreamID types.LogStreamID) error

	GetClusterInfo(ctx context.Context) (*mrpb.ClusterInfo, error)

	AddPeer(ctx context.Context, nodeID types.NodeID, peerURL, rpcURL string) error

	RemovePeer(ctx context.Context, nodeID types.NodeID) error

	NumberOfMR() int
}

func New

type MockClusterMetadataView

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

MockClusterMetadataView is a mock of ClusterMetadataView interface.

func NewMockClusterMetadataView

func NewMockClusterMetadataView(ctrl *gomock.Controller) *MockClusterMetadataView

NewMockClusterMetadataView creates a new mock instance.

func (*MockClusterMetadataView) ClusterMetadata

ClusterMetadata mocks base method.

func (*MockClusterMetadataView) EXPECT

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

func (*MockClusterMetadataView) StorageNode

StorageNode mocks base method.

type MockClusterMetadataViewMockRecorder

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

MockClusterMetadataViewMockRecorder is the mock recorder for MockClusterMetadataView.

func (*MockClusterMetadataViewMockRecorder) ClusterMetadata

func (mr *MockClusterMetadataViewMockRecorder) ClusterMetadata(arg0 any) *gomock.Call

ClusterMetadata indicates an expected call of ClusterMetadata.

func (*MockClusterMetadataViewMockRecorder) StorageNode

func (mr *MockClusterMetadataViewMockRecorder) StorageNode(arg0, arg1 any) *gomock.Call

StorageNode indicates an expected call of StorageNode.

type MockMetadataRepositoryManager

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

MockMetadataRepositoryManager is a mock of MetadataRepositoryManager interface.

func NewMockMetadataRepositoryManager

func NewMockMetadataRepositoryManager(ctrl *gomock.Controller) *MockMetadataRepositoryManager

NewMockMetadataRepositoryManager creates a new mock instance.

func (*MockMetadataRepositoryManager) AddPeer

func (m *MockMetadataRepositoryManager) AddPeer(arg0 context.Context, arg1 types.NodeID, arg2, arg3 string) error

AddPeer mocks base method.

func (*MockMetadataRepositoryManager) Close

Close mocks base method.

func (*MockMetadataRepositoryManager) ClusterMetadataView

func (m *MockMetadataRepositoryManager) ClusterMetadataView() ClusterMetadataView

ClusterMetadataView mocks base method.

func (*MockMetadataRepositoryManager) EXPECT

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

func (*MockMetadataRepositoryManager) GetClusterInfo

func (m *MockMetadataRepositoryManager) GetClusterInfo(arg0 context.Context) (*mrpb.ClusterInfo, error)

GetClusterInfo mocks base method.

func (*MockMetadataRepositoryManager) NumberOfMR

func (m *MockMetadataRepositoryManager) NumberOfMR() int

NumberOfMR mocks base method.

func (*MockMetadataRepositoryManager) RegisterLogStream

RegisterLogStream mocks base method.

func (*MockMetadataRepositoryManager) RegisterStorageNode

RegisterStorageNode mocks base method.

func (*MockMetadataRepositoryManager) RegisterTopic

func (m *MockMetadataRepositoryManager) RegisterTopic(arg0 context.Context, arg1 types.TopicID) error

RegisterTopic mocks base method.

func (*MockMetadataRepositoryManager) RemovePeer

func (m *MockMetadataRepositoryManager) RemovePeer(arg0 context.Context, arg1 types.NodeID) error

RemovePeer mocks base method.

func (*MockMetadataRepositoryManager) Seal

Seal mocks base method.

func (*MockMetadataRepositoryManager) UnregisterLogStream

func (m *MockMetadataRepositoryManager) UnregisterLogStream(arg0 context.Context, arg1 types.LogStreamID) error

UnregisterLogStream mocks base method.

func (*MockMetadataRepositoryManager) UnregisterStorageNode

func (m *MockMetadataRepositoryManager) UnregisterStorageNode(arg0 context.Context, arg1 types.StorageNodeID) error

UnregisterStorageNode mocks base method.

func (*MockMetadataRepositoryManager) UnregisterTopic

func (m *MockMetadataRepositoryManager) UnregisterTopic(arg0 context.Context, arg1 types.TopicID) error

UnregisterTopic mocks base method.

func (*MockMetadataRepositoryManager) Unseal

Unseal mocks base method.

func (*MockMetadataRepositoryManager) UpdateLogStream

UpdateLogStream mocks base method.

type MockMetadataRepositoryManagerMockRecorder

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

MockMetadataRepositoryManagerMockRecorder is the mock recorder for MockMetadataRepositoryManager.

func (*MockMetadataRepositoryManagerMockRecorder) AddPeer

func (mr *MockMetadataRepositoryManagerMockRecorder) AddPeer(arg0, arg1, arg2, arg3 any) *gomock.Call

AddPeer indicates an expected call of AddPeer.

func (*MockMetadataRepositoryManagerMockRecorder) Close

Close indicates an expected call of Close.

func (*MockMetadataRepositoryManagerMockRecorder) ClusterMetadataView

func (mr *MockMetadataRepositoryManagerMockRecorder) ClusterMetadataView() *gomock.Call

ClusterMetadataView indicates an expected call of ClusterMetadataView.

func (*MockMetadataRepositoryManagerMockRecorder) GetClusterInfo

func (mr *MockMetadataRepositoryManagerMockRecorder) GetClusterInfo(arg0 any) *gomock.Call

GetClusterInfo indicates an expected call of GetClusterInfo.

func (*MockMetadataRepositoryManagerMockRecorder) NumberOfMR

NumberOfMR indicates an expected call of NumberOfMR.

func (*MockMetadataRepositoryManagerMockRecorder) RegisterLogStream

func (mr *MockMetadataRepositoryManagerMockRecorder) RegisterLogStream(arg0, arg1 any) *gomock.Call

RegisterLogStream indicates an expected call of RegisterLogStream.

func (*MockMetadataRepositoryManagerMockRecorder) RegisterStorageNode

func (mr *MockMetadataRepositoryManagerMockRecorder) RegisterStorageNode(arg0, arg1 any) *gomock.Call

RegisterStorageNode indicates an expected call of RegisterStorageNode.

func (*MockMetadataRepositoryManagerMockRecorder) RegisterTopic

func (mr *MockMetadataRepositoryManagerMockRecorder) RegisterTopic(arg0, arg1 any) *gomock.Call

RegisterTopic indicates an expected call of RegisterTopic.

func (*MockMetadataRepositoryManagerMockRecorder) RemovePeer

func (mr *MockMetadataRepositoryManagerMockRecorder) RemovePeer(arg0, arg1 any) *gomock.Call

RemovePeer indicates an expected call of RemovePeer.

func (*MockMetadataRepositoryManagerMockRecorder) Seal

Seal indicates an expected call of Seal.

func (*MockMetadataRepositoryManagerMockRecorder) UnregisterLogStream

func (mr *MockMetadataRepositoryManagerMockRecorder) UnregisterLogStream(arg0, arg1 any) *gomock.Call

UnregisterLogStream indicates an expected call of UnregisterLogStream.

func (*MockMetadataRepositoryManagerMockRecorder) UnregisterStorageNode

func (mr *MockMetadataRepositoryManagerMockRecorder) UnregisterStorageNode(arg0, arg1 any) *gomock.Call

UnregisterStorageNode indicates an expected call of UnregisterStorageNode.

func (*MockMetadataRepositoryManagerMockRecorder) UnregisterTopic

func (mr *MockMetadataRepositoryManagerMockRecorder) UnregisterTopic(arg0, arg1 any) *gomock.Call

UnregisterTopic indicates an expected call of UnregisterTopic.

func (*MockMetadataRepositoryManagerMockRecorder) Unseal

func (mr *MockMetadataRepositoryManagerMockRecorder) Unseal(arg0, arg1 any) *gomock.Call

Unseal indicates an expected call of Unseal.

func (*MockMetadataRepositoryManagerMockRecorder) UpdateLogStream

func (mr *MockMetadataRepositoryManagerMockRecorder) UpdateLogStream(arg0, arg1 any) *gomock.Call

UpdateLogStream indicates an expected call of UpdateLogStream.

type Option

type Option interface {
	// contains filtered or unexported methods
}

func WithAddresses

func WithAddresses(addrs ...string) Option

func WithClusterID

func WithClusterID(cid types.ClusterID) Option

func WithDefaultGRPCDialOptions added in v0.21.0

func WithDefaultGRPCDialOptions(grpcDialOpts ...grpc.DialOption) Option

func WithInitialMRConnRetryBackoff

func WithInitialMRConnRetryBackoff(backoff time.Duration) Option

func WithInitialMRConnRetryCount

func WithInitialMRConnRetryCount(retry int) Option

func WithLogger

func WithLogger(logger *zap.Logger) Option

func WithMRManagerCallTimeout

func WithMRManagerCallTimeout(callTimeout time.Duration) Option

func WithMRManagerConnTimeout

func WithMRManagerConnTimeout(connTimeout time.Duration) Option

func WithReplicationFactor added in v0.16.0

func WithReplicationFactor(repfactor int) Option

Jump to

Keyboard shortcuts

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