Documentation ¶
Overview ¶
Package snmanager is a generated GoMock package.
Index ¶
- type MockStorageNodeManager
- func (m *MockStorageNodeManager) AddLogStream(arg0 context.Context, arg1 *varlogpb.LogStreamDescriptor) (*varlogpb.LogStreamDescriptor, error)
- func (m *MockStorageNodeManager) AddLogStreamReplica(arg0 context.Context, arg1 types.StorageNodeID, arg2 types.TopicID, ...) (snpb.LogStreamReplicaMetadataDescriptor, error)
- func (m *MockStorageNodeManager) AddStorageNode(arg0 context.Context, arg1 types.StorageNodeID, arg2 string)
- func (m *MockStorageNodeManager) Close() error
- func (m *MockStorageNodeManager) Contains(arg0 types.StorageNodeID) bool
- func (m *MockStorageNodeManager) ContainsAddress(arg0 string) bool
- func (m *MockStorageNodeManager) EXPECT() *MockStorageNodeManagerMockRecorder
- func (m *MockStorageNodeManager) GetMetadata(arg0 context.Context, arg1 types.StorageNodeID) (*snpb.StorageNodeMetadataDescriptor, error)
- func (m *MockStorageNodeManager) GetMetadataByAddress(arg0 context.Context, arg1 types.StorageNodeID, arg2 string) (*snpb.StorageNodeMetadataDescriptor, error)
- func (m *MockStorageNodeManager) RemoveLogStreamReplica(arg0 context.Context, arg1 types.StorageNodeID, arg2 types.TopicID, ...) error
- func (m *MockStorageNodeManager) RemoveStorageNode(arg0 types.StorageNodeID)
- func (m *MockStorageNodeManager) Seal(arg0 context.Context, arg1 types.TopicID, arg2 types.LogStreamID, ...) ([]snpb.LogStreamReplicaMetadataDescriptor, error)
- func (m *MockStorageNodeManager) Sync(arg0 context.Context, arg1 types.TopicID, arg2 types.LogStreamID, ...) (*snpb.SyncStatus, error)
- func (m *MockStorageNodeManager) Trim(arg0 context.Context, arg1 types.TopicID, arg2 types.GLSN) ([]vmspb.TrimResult, error)
- func (m *MockStorageNodeManager) Unseal(arg0 context.Context, arg1 types.TopicID, arg2 types.LogStreamID) error
- type MockStorageNodeManagerMockRecorder
- func (mr *MockStorageNodeManagerMockRecorder) AddLogStream(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockStorageNodeManagerMockRecorder) AddLogStreamReplica(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call
- func (mr *MockStorageNodeManagerMockRecorder) AddStorageNode(arg0, arg1, arg2 interface{}) *gomock.Call
- func (mr *MockStorageNodeManagerMockRecorder) Close() *gomock.Call
- func (mr *MockStorageNodeManagerMockRecorder) Contains(arg0 interface{}) *gomock.Call
- func (mr *MockStorageNodeManagerMockRecorder) ContainsAddress(arg0 interface{}) *gomock.Call
- func (mr *MockStorageNodeManagerMockRecorder) GetMetadata(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockStorageNodeManagerMockRecorder) GetMetadataByAddress(arg0, arg1, arg2 interface{}) *gomock.Call
- func (mr *MockStorageNodeManagerMockRecorder) RemoveLogStreamReplica(arg0, arg1, arg2, arg3 interface{}) *gomock.Call
- func (mr *MockStorageNodeManagerMockRecorder) RemoveStorageNode(arg0 interface{}) *gomock.Call
- func (mr *MockStorageNodeManagerMockRecorder) Seal(arg0, arg1, arg2, arg3 interface{}) *gomock.Call
- func (mr *MockStorageNodeManagerMockRecorder) Sync(arg0, arg1, arg2, arg3, arg4, arg5 interface{}) *gomock.Call
- func (mr *MockStorageNodeManagerMockRecorder) Trim(arg0, arg1, arg2 interface{}) *gomock.Call
- func (mr *MockStorageNodeManagerMockRecorder) Unseal(arg0, arg1, arg2 interface{}) *gomock.Call
- type Option
- type StorageNodeManager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockStorageNodeManager ¶
type MockStorageNodeManager struct {
// contains filtered or unexported fields
}
MockStorageNodeManager is a mock of StorageNodeManager interface.
func NewMockStorageNodeManager ¶
func NewMockStorageNodeManager(ctrl *gomock.Controller) *MockStorageNodeManager
NewMockStorageNodeManager creates a new mock instance.
func (*MockStorageNodeManager) AddLogStream ¶
func (m *MockStorageNodeManager) AddLogStream(arg0 context.Context, arg1 *varlogpb.LogStreamDescriptor) (*varlogpb.LogStreamDescriptor, error)
AddLogStream mocks base method.
func (*MockStorageNodeManager) AddLogStreamReplica ¶
func (m *MockStorageNodeManager) AddLogStreamReplica(arg0 context.Context, arg1 types.StorageNodeID, arg2 types.TopicID, arg3 types.LogStreamID, arg4 string) (snpb.LogStreamReplicaMetadataDescriptor, error)
AddLogStreamReplica mocks base method.
func (*MockStorageNodeManager) AddStorageNode ¶
func (m *MockStorageNodeManager) AddStorageNode(arg0 context.Context, arg1 types.StorageNodeID, arg2 string)
AddStorageNode mocks base method.
func (*MockStorageNodeManager) Close ¶
func (m *MockStorageNodeManager) Close() error
Close mocks base method.
func (*MockStorageNodeManager) Contains ¶
func (m *MockStorageNodeManager) Contains(arg0 types.StorageNodeID) bool
Contains mocks base method.
func (*MockStorageNodeManager) ContainsAddress ¶
func (m *MockStorageNodeManager) ContainsAddress(arg0 string) bool
ContainsAddress mocks base method.
func (*MockStorageNodeManager) EXPECT ¶
func (m *MockStorageNodeManager) EXPECT() *MockStorageNodeManagerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockStorageNodeManager) GetMetadata ¶
func (m *MockStorageNodeManager) GetMetadata(arg0 context.Context, arg1 types.StorageNodeID) (*snpb.StorageNodeMetadataDescriptor, error)
GetMetadata mocks base method.
func (*MockStorageNodeManager) GetMetadataByAddress ¶
func (m *MockStorageNodeManager) GetMetadataByAddress(arg0 context.Context, arg1 types.StorageNodeID, arg2 string) (*snpb.StorageNodeMetadataDescriptor, error)
GetMetadataByAddress mocks base method.
func (*MockStorageNodeManager) RemoveLogStreamReplica ¶
func (m *MockStorageNodeManager) RemoveLogStreamReplica(arg0 context.Context, arg1 types.StorageNodeID, arg2 types.TopicID, arg3 types.LogStreamID) error
RemoveLogStreamReplica mocks base method.
func (*MockStorageNodeManager) RemoveStorageNode ¶
func (m *MockStorageNodeManager) RemoveStorageNode(arg0 types.StorageNodeID)
RemoveStorageNode mocks base method.
func (*MockStorageNodeManager) Seal ¶
func (m *MockStorageNodeManager) Seal(arg0 context.Context, arg1 types.TopicID, arg2 types.LogStreamID, arg3 types.GLSN) ([]snpb.LogStreamReplicaMetadataDescriptor, error)
Seal mocks base method.
func (*MockStorageNodeManager) Sync ¶
func (m *MockStorageNodeManager) Sync(arg0 context.Context, arg1 types.TopicID, arg2 types.LogStreamID, arg3, arg4 types.StorageNodeID, arg5 types.GLSN) (*snpb.SyncStatus, error)
Sync mocks base method.
func (*MockStorageNodeManager) Trim ¶
func (m *MockStorageNodeManager) Trim(arg0 context.Context, arg1 types.TopicID, arg2 types.GLSN) ([]vmspb.TrimResult, error)
Trim mocks base method.
func (*MockStorageNodeManager) Unseal ¶
func (m *MockStorageNodeManager) Unseal(arg0 context.Context, arg1 types.TopicID, arg2 types.LogStreamID) error
Unseal mocks base method.
type MockStorageNodeManagerMockRecorder ¶
type MockStorageNodeManagerMockRecorder struct {
// contains filtered or unexported fields
}
MockStorageNodeManagerMockRecorder is the mock recorder for MockStorageNodeManager.
func (*MockStorageNodeManagerMockRecorder) AddLogStream ¶
func (mr *MockStorageNodeManagerMockRecorder) AddLogStream(arg0, arg1 interface{}) *gomock.Call
AddLogStream indicates an expected call of AddLogStream.
func (*MockStorageNodeManagerMockRecorder) AddLogStreamReplica ¶
func (mr *MockStorageNodeManagerMockRecorder) AddLogStreamReplica(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call
AddLogStreamReplica indicates an expected call of AddLogStreamReplica.
func (*MockStorageNodeManagerMockRecorder) AddStorageNode ¶
func (mr *MockStorageNodeManagerMockRecorder) AddStorageNode(arg0, arg1, arg2 interface{}) *gomock.Call
AddStorageNode indicates an expected call of AddStorageNode.
func (*MockStorageNodeManagerMockRecorder) Close ¶
func (mr *MockStorageNodeManagerMockRecorder) Close() *gomock.Call
Close indicates an expected call of Close.
func (*MockStorageNodeManagerMockRecorder) Contains ¶
func (mr *MockStorageNodeManagerMockRecorder) Contains(arg0 interface{}) *gomock.Call
Contains indicates an expected call of Contains.
func (*MockStorageNodeManagerMockRecorder) ContainsAddress ¶
func (mr *MockStorageNodeManagerMockRecorder) ContainsAddress(arg0 interface{}) *gomock.Call
ContainsAddress indicates an expected call of ContainsAddress.
func (*MockStorageNodeManagerMockRecorder) GetMetadata ¶
func (mr *MockStorageNodeManagerMockRecorder) GetMetadata(arg0, arg1 interface{}) *gomock.Call
GetMetadata indicates an expected call of GetMetadata.
func (*MockStorageNodeManagerMockRecorder) GetMetadataByAddress ¶
func (mr *MockStorageNodeManagerMockRecorder) GetMetadataByAddress(arg0, arg1, arg2 interface{}) *gomock.Call
GetMetadataByAddress indicates an expected call of GetMetadataByAddress.
func (*MockStorageNodeManagerMockRecorder) RemoveLogStreamReplica ¶
func (mr *MockStorageNodeManagerMockRecorder) RemoveLogStreamReplica(arg0, arg1, arg2, arg3 interface{}) *gomock.Call
RemoveLogStreamReplica indicates an expected call of RemoveLogStreamReplica.
func (*MockStorageNodeManagerMockRecorder) RemoveStorageNode ¶
func (mr *MockStorageNodeManagerMockRecorder) RemoveStorageNode(arg0 interface{}) *gomock.Call
RemoveStorageNode indicates an expected call of RemoveStorageNode.
func (*MockStorageNodeManagerMockRecorder) Seal ¶
func (mr *MockStorageNodeManagerMockRecorder) Seal(arg0, arg1, arg2, arg3 interface{}) *gomock.Call
Seal indicates an expected call of Seal.
func (*MockStorageNodeManagerMockRecorder) Sync ¶
func (mr *MockStorageNodeManagerMockRecorder) Sync(arg0, arg1, arg2, arg3, arg4, arg5 interface{}) *gomock.Call
Sync indicates an expected call of Sync.
func (*MockStorageNodeManagerMockRecorder) Trim ¶
func (mr *MockStorageNodeManagerMockRecorder) Trim(arg0, arg1, arg2 interface{}) *gomock.Call
Trim indicates an expected call of Trim.
func (*MockStorageNodeManagerMockRecorder) Unseal ¶
func (mr *MockStorageNodeManagerMockRecorder) Unseal(arg0, arg1, arg2 interface{}) *gomock.Call
Unseal indicates an expected call of Unseal.
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
func WithClusterID ¶
func WithClusterMetadataView ¶
func WithClusterMetadataView(cmview mrmanager.ClusterMetadataView) Option
func WithLogger ¶
type StorageNodeManager ¶
type StorageNodeManager interface { Contains(storageNodeID types.StorageNodeID) bool ContainsAddress(addr string) bool GetMetadataByAddress(ctx context.Context, snid types.StorageNodeID, addr string) (*snpb.StorageNodeMetadataDescriptor, error) // GetMetadata returns metadata for the storage node identified by the argument snid. GetMetadata(ctx context.Context, snid types.StorageNodeID) (*snpb.StorageNodeMetadataDescriptor, error) // AddStorageNode adds the storage node to the manager. // The new storage node should be registered to the metadata repository first. // It is idempotent - already registered one also can be passed by this method. // Note that this method cannot guarantee that the manager maintains the storage node immediately. However, the storage node is eventually managed since it is registered to the metadata repository. AddStorageNode(ctx context.Context, snid types.StorageNodeID, addr string) // RemoveStorageNode unregisters the storage node identified by the argument snid. RemoveStorageNode(snid types.StorageNodeID) // AddLogStream adds a new log stream to storage nodes. AddLogStream(ctx context.Context, lsd *varlogpb.LogStreamDescriptor) (*varlogpb.LogStreamDescriptor, error) // AddLogStreamReplica adds a new log stream replica to the storage node whose ID is the argument snid. // The new log stream replica is identified by the argument tpid and lsid. The argument path is storage node path, for example `/data/cid_1_snid_1`. AddLogStreamReplica(ctx context.Context, snid types.StorageNodeID, tpid types.TopicID, lsid types.LogStreamID, path string) (snpb.LogStreamReplicaMetadataDescriptor, error) RemoveLogStreamReplica(ctx context.Context, snid types.StorageNodeID, tpid types.TopicID, lsid types.LogStreamID) error // Seal seals logstream replicas of storage nodes corresponded with the logStreamID. It // passes the last committed GLSN to the logstream replicas. Seal(ctx context.Context, topicID types.TopicID, logStreamID types.LogStreamID, lastCommittedGLSN types.GLSN) ([]snpb.LogStreamReplicaMetadataDescriptor, error) Sync(ctx context.Context, topicID types.TopicID, logStreamID types.LogStreamID, srcID, dstID types.StorageNodeID, lastGLSN types.GLSN) (*snpb.SyncStatus, error) Unseal(ctx context.Context, topicID types.TopicID, logStreamID types.LogStreamID) error Trim(ctx context.Context, topicID types.TopicID, lastGLSN types.GLSN) ([]vmspb.TrimResult, error) Close() error }