Documentation ¶
Overview ¶
Package mrmanager is a generated GoMock package.
Index ¶
- Constants
- type ClusterMetadataView
- type ClusterMetadataViewGetter
- type MetadataRepositoryManager
- type MockClusterMetadataView
- func (m *MockClusterMetadataView) ClusterMetadata(arg0 context.Context) (*varlogpb.MetadataDescriptor, error)
- func (m *MockClusterMetadataView) EXPECT() *MockClusterMetadataViewMockRecorder
- func (m *MockClusterMetadataView) StorageNode(arg0 context.Context, arg1 types.StorageNodeID) (*varlogpb.StorageNodeDescriptor, error)
- type MockClusterMetadataViewMockRecorder
- type MockMetadataRepositoryManager
- func (m *MockMetadataRepositoryManager) AddPeer(arg0 context.Context, arg1 types.NodeID, arg2, arg3 string) error
- func (m *MockMetadataRepositoryManager) Close() error
- func (m *MockMetadataRepositoryManager) ClusterMetadataView() ClusterMetadataView
- func (m *MockMetadataRepositoryManager) EXPECT() *MockMetadataRepositoryManagerMockRecorder
- func (m *MockMetadataRepositoryManager) GetClusterInfo(arg0 context.Context) (*mrpb.ClusterInfo, error)
- func (m *MockMetadataRepositoryManager) NumberOfMR() int
- func (m *MockMetadataRepositoryManager) RegisterLogStream(arg0 context.Context, arg1 *varlogpb.LogStreamDescriptor) error
- func (m *MockMetadataRepositoryManager) RegisterStorageNode(arg0 context.Context, arg1 *varlogpb.StorageNodeDescriptor) error
- func (m *MockMetadataRepositoryManager) RegisterTopic(arg0 context.Context, arg1 types.TopicID) error
- func (m *MockMetadataRepositoryManager) RemovePeer(arg0 context.Context, arg1 types.NodeID) error
- func (m *MockMetadataRepositoryManager) Seal(arg0 context.Context, arg1 types.LogStreamID) (types.GLSN, error)
- func (m *MockMetadataRepositoryManager) UnregisterLogStream(arg0 context.Context, arg1 types.LogStreamID) error
- func (m *MockMetadataRepositoryManager) UnregisterStorageNode(arg0 context.Context, arg1 types.StorageNodeID) error
- func (m *MockMetadataRepositoryManager) UnregisterTopic(arg0 context.Context, arg1 types.TopicID) error
- func (m *MockMetadataRepositoryManager) Unseal(arg0 context.Context, arg1 types.LogStreamID) error
- func (m *MockMetadataRepositoryManager) UpdateLogStream(arg0 context.Context, arg1 *varlogpb.LogStreamDescriptor) error
- type MockMetadataRepositoryManagerMockRecorder
- func (mr *MockMetadataRepositoryManagerMockRecorder) AddPeer(arg0, arg1, arg2, arg3 any) *gomock.Call
- func (mr *MockMetadataRepositoryManagerMockRecorder) Close() *gomock.Call
- func (mr *MockMetadataRepositoryManagerMockRecorder) ClusterMetadataView() *gomock.Call
- func (mr *MockMetadataRepositoryManagerMockRecorder) GetClusterInfo(arg0 any) *gomock.Call
- func (mr *MockMetadataRepositoryManagerMockRecorder) NumberOfMR() *gomock.Call
- func (mr *MockMetadataRepositoryManagerMockRecorder) RegisterLogStream(arg0, arg1 any) *gomock.Call
- func (mr *MockMetadataRepositoryManagerMockRecorder) RegisterStorageNode(arg0, arg1 any) *gomock.Call
- func (mr *MockMetadataRepositoryManagerMockRecorder) RegisterTopic(arg0, arg1 any) *gomock.Call
- func (mr *MockMetadataRepositoryManagerMockRecorder) RemovePeer(arg0, arg1 any) *gomock.Call
- func (mr *MockMetadataRepositoryManagerMockRecorder) Seal(arg0, arg1 any) *gomock.Call
- func (mr *MockMetadataRepositoryManagerMockRecorder) UnregisterLogStream(arg0, arg1 any) *gomock.Call
- func (mr *MockMetadataRepositoryManagerMockRecorder) UnregisterStorageNode(arg0, arg1 any) *gomock.Call
- func (mr *MockMetadataRepositoryManagerMockRecorder) UnregisterTopic(arg0, arg1 any) *gomock.Call
- func (mr *MockMetadataRepositoryManagerMockRecorder) Unseal(arg0, arg1 any) *gomock.Call
- func (mr *MockMetadataRepositoryManagerMockRecorder) UpdateLogStream(arg0, arg1 any) *gomock.Call
- type Option
- func WithAddresses(addrs ...string) Option
- func WithClusterID(cid types.ClusterID) Option
- func WithDefaultGRPCDialOptions(grpcDialOpts ...grpc.DialOption) Option
- func WithInitialMRConnRetryBackoff(backoff time.Duration) Option
- func WithInitialMRConnRetryCount(retry int) Option
- func WithLogger(logger *zap.Logger) Option
- func WithMRManagerCallTimeout(callTimeout time.Duration) Option
- func WithMRManagerConnTimeout(connTimeout time.Duration) Option
- func WithReplicationFactor(repfactor int) Option
Constants ¶
const ( DefaultInitialMRConnectRetryCount = -1 DefaultInitialMRConnectRetryBackoff = 100 * time.Millisecond DefaultMRConnTimeout = 1 * time.Second DefaultMRCallTimeout = 3 * time.Second )
const (
RPCAddrsFetchRetryInterval = 100 * time.Millisecond
)
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 }
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 ¶
func (m *MockClusterMetadataView) ClusterMetadata(arg0 context.Context) (*varlogpb.MetadataDescriptor, error)
ClusterMetadata mocks base method.
func (*MockClusterMetadataView) EXPECT ¶
func (m *MockClusterMetadataView) EXPECT() *MockClusterMetadataViewMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockClusterMetadataView) StorageNode ¶
func (m *MockClusterMetadataView) StorageNode(arg0 context.Context, arg1 types.StorageNodeID) (*varlogpb.StorageNodeDescriptor, error)
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 ¶
func (m *MockMetadataRepositoryManager) Close() error
Close mocks base method.
func (*MockMetadataRepositoryManager) ClusterMetadataView ¶
func (m *MockMetadataRepositoryManager) ClusterMetadataView() ClusterMetadataView
ClusterMetadataView mocks base method.
func (*MockMetadataRepositoryManager) EXPECT ¶
func (m *MockMetadataRepositoryManager) EXPECT() *MockMetadataRepositoryManagerMockRecorder
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 ¶
func (m *MockMetadataRepositoryManager) RegisterLogStream(arg0 context.Context, arg1 *varlogpb.LogStreamDescriptor) error
RegisterLogStream mocks base method.
func (*MockMetadataRepositoryManager) RegisterStorageNode ¶
func (m *MockMetadataRepositoryManager) RegisterStorageNode(arg0 context.Context, arg1 *varlogpb.StorageNodeDescriptor) error
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 ¶
RemovePeer mocks base method.
func (*MockMetadataRepositoryManager) Seal ¶
func (m *MockMetadataRepositoryManager) Seal(arg0 context.Context, arg1 types.LogStreamID) (types.GLSN, error)
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 ¶
func (m *MockMetadataRepositoryManager) Unseal(arg0 context.Context, arg1 types.LogStreamID) error
Unseal mocks base method.
func (*MockMetadataRepositoryManager) UpdateLogStream ¶
func (m *MockMetadataRepositoryManager) UpdateLogStream(arg0 context.Context, arg1 *varlogpb.LogStreamDescriptor) error
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 ¶
func (mr *MockMetadataRepositoryManagerMockRecorder) Close() *gomock.Call
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 ¶
func (mr *MockMetadataRepositoryManagerMockRecorder) NumberOfMR() *gomock.Call
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 ¶
func (mr *MockMetadataRepositoryManagerMockRecorder) Seal(arg0, arg1 any) *gomock.Call
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 WithClusterID ¶
func WithDefaultGRPCDialOptions ¶ added in v0.21.0
func WithDefaultGRPCDialOptions(grpcDialOpts ...grpc.DialOption) Option