Documentation ¶
Index ¶
- func NewTestVMSOptions(opts ...admin.Option) []admin.Option
- func WithTestCluster(t *testing.T, opts []Option, f func(env *VarlogCluster)) func()
- type Option
- func WithClusterID(cid types.ClusterID) Option
- func WithCollectorName(collector string) Option
- func WithLogger(logger *zap.Logger) Option
- func WithMRCount(num int) Option
- func WithMetadataRepositoryManagerOptions(opts ...mrmanager.Option) Option
- func WithNumberOfClients(numCL int) Option
- func WithNumberOfLogStreams(numLS int) Option
- func WithNumberOfStorageNodes(numSN int) Option
- func WithNumberOfTopics(numTopic int) Option
- func WithPortBase(portBase int) Option
- func WithReplicationFactor(rf int) Option
- func WithReporterClientFactory(fac metarepos.ReporterClientFactory) Option
- func WithSnapCount(cnt int) Option
- func WithVMSOptions(vmsOpts ...admin.Option) Option
- func WithoutVMS() Option
- func WithoutWAL() Option
- type VarlogCluster
- func (clus *VarlogCluster) AddLS(t *testing.T, topicID types.TopicID) types.LogStreamID
- func (clus *VarlogCluster) AddLSIncomplete(t *testing.T, topicID types.TopicID) types.LogStreamID
- func (clus *VarlogCluster) AddLSWithoutMR(t *testing.T, topicID types.TopicID) types.LogStreamID
- func (clus *VarlogCluster) AddSN(t *testing.T) types.StorageNodeID
- func (clus *VarlogCluster) AddTopic(t *testing.T) types.TopicID
- func (clus *VarlogCluster) AppendMR(t *testing.T)
- func (clus *VarlogCluster) AppendUncommittedLog(t *testing.T, topicID types.TopicID, lsID types.LogStreamID, data []byte)
- func (clus *VarlogCluster) BackupStorageNodeIDOf(t *testing.T, lsID types.LogStreamID) types.StorageNodeID
- func (clus *VarlogCluster) ClientAtIndex(t *testing.T, idx int) varlog.Log
- func (clus *VarlogCluster) ClientRefresh(t *testing.T)
- func (clus *VarlogCluster) Close(t *testing.T)
- func (clus *VarlogCluster) CloseMR(t *testing.T, idx int)
- func (clus *VarlogCluster) CloseMRAllForRestart(t *testing.T)
- func (clus *VarlogCluster) CloseMRClientAt(t *testing.T, idx int)
- func (clus *VarlogCluster) CloseSN(t *testing.T, snID types.StorageNodeID)
- func (clus *VarlogCluster) CloseSNClientOf(t *testing.T, snID types.StorageNodeID)
- func (clus *VarlogCluster) ClusterID() types.ClusterID
- func (clus *VarlogCluster) CommitWithoutMR(t *testing.T, lsID types.LogStreamID, committedLLSNOffset types.LLSN, ...)
- func (clus *VarlogCluster) GetMR(t *testing.T) *metarepos.RaftMetadataRepository
- func (clus *VarlogCluster) GetMRByIndex(t *testing.T, idx int) *metarepos.RaftMetadataRepository
- func (clus *VarlogCluster) GetMetadata(t *testing.T) *varlogpb.MetadataDescriptor
- func (clus *VarlogCluster) GetUncommittedLLSNOffset(t *testing.T, lsID types.LogStreamID) types.LLSN
- func (clus *VarlogCluster) GetVMS() *admin.Admin
- func (clus *VarlogCluster) GetVMSClient(t *testing.T) varlog.Admin
- func (clus *VarlogCluster) HealthCheckForMR(t *testing.T)
- func (clus *VarlogCluster) IndexOfLeaderMR() int
- func (clus *VarlogCluster) LeaderFail(t *testing.T)
- func (clus *VarlogCluster) LogStreamID(t *testing.T, topicID types.TopicID, idx int) types.LogStreamID
- func (clus *VarlogCluster) LogStreamIDs(topicID types.TopicID) []types.LogStreamID
- func (clus *VarlogCluster) Logger() *zap.Logger
- func (clus *VarlogCluster) LookupMR(nodeID types.NodeID) (*metarepos.RaftMetadataRepository, bool)
- func (clus *VarlogCluster) LookupSN(t *testing.T, snID types.StorageNodeID) *storagenode.StorageNode
- func (clus *VarlogCluster) MRClientAt(t *testing.T, idx int) mrc.MetadataRepositoryClient
- func (clus *VarlogCluster) MRManagementClientAt(t *testing.T, idx int) mrc.MetadataRepositoryManagementClient
- func (clus *VarlogCluster) MRPeerAtIndex(t *testing.T, idx int) string
- func (clus *VarlogCluster) MRPeers() []string
- func (clus *VarlogCluster) MRRPCEndpointAtIndex(t *testing.T, idx int) string
- func (clus *VarlogCluster) MRRPCEndpoints() []string
- func (clus *VarlogCluster) MetadataRepositories() []*metarepos.RaftMetadataRepository
- func (clus *VarlogCluster) MetadataRepositoryIDAt(t *testing.T, idx int) types.NodeID
- func (clus *VarlogCluster) MetadataRepositoryIDs() []types.NodeID
- func (clus *VarlogCluster) NewMRClient(t *testing.T, idx int)
- func (clus *VarlogCluster) NewReportCommitterClient(t *testing.T, snID types.StorageNodeID)
- func (clus *VarlogCluster) NewSNClient(t *testing.T, snID types.StorageNodeID)
- func (clus *VarlogCluster) NumberOfClients() int
- func (clus *VarlogCluster) NumberOfLogStreams(topicID types.TopicID) int
- func (clus *VarlogCluster) NumberOfMetadataRepositories() int
- func (clus *VarlogCluster) NumberOfStorageNodes() int
- func (clus *VarlogCluster) PrimaryStorageNodeIDOf(t *testing.T, lsID types.LogStreamID) types.StorageNodeID
- func (clus *VarlogCluster) RecoverMR(t *testing.T)
- func (clus *VarlogCluster) RecoverSN(t *testing.T, snID types.StorageNodeID) *storagenode.StorageNode
- func (clus *VarlogCluster) ReplicasOf(t *testing.T, lsID types.LogStreamID) []varlogpb.ReplicaDescriptor
- func (clus *VarlogCluster) ReplicationFactor() int
- func (clus *VarlogCluster) ReportCommitterClientOf(t *testing.T, snID types.StorageNodeID) reportcommitter.Client
- func (clus *VarlogCluster) RestartMR(t *testing.T, idx int)
- func (clus *VarlogCluster) SNClientOf(t *testing.T, snID types.StorageNodeID) client.StorageNodeManagementClient
- func (clus *VarlogCluster) StartMR(t *testing.T, idx int)
- func (clus *VarlogCluster) StartVMS(t *testing.T)
- func (clus *VarlogCluster) StorageNodeIDAtIndex(t *testing.T, idx int) types.StorageNodeID
- func (clus *VarlogCluster) StorageNodes() map[types.StorageNodeID]*storagenode.StorageNode
- func (clus *VarlogCluster) StorageNodesManagementClients() map[types.StorageNodeID]client.StorageNodeManagementClient
- func (clus *VarlogCluster) TopicIDs() []types.TopicID
- func (clus *VarlogCluster) UnsealWithoutMR(t *testing.T, topicID types.TopicID, logStreamID types.LogStreamID, ...)
- func (clus *VarlogCluster) UpdateLS(t *testing.T, tpID types.TopicID, lsID types.LogStreamID, ...)
- func (clus *VarlogCluster) UpdateLSWithoutMR(t *testing.T, topicID types.TopicID, logStreamID types.LogStreamID, ...)
- func (clus *VarlogCluster) WaitCommit(t *testing.T, lsID types.LogStreamID, version types.Version)
- func (clus *VarlogCluster) WaitSealed(t *testing.T, lsID types.LogStreamID)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithTestCluster ¶
func WithTestCluster(t *testing.T, opts []Option, f func(env *VarlogCluster)) func()
Types ¶
type Option ¶
type Option func(*config)
func WithClusterID ¶
func WithCollectorName ¶
func WithLogger ¶
func WithMRCount ¶
func WithNumberOfClients ¶
func WithNumberOfLogStreams ¶
func WithNumberOfTopics ¶
func WithPortBase ¶
func WithReplicationFactor ¶
func WithReporterClientFactory ¶
func WithReporterClientFactory(fac metarepos.ReporterClientFactory) Option
func WithSnapCount ¶
func WithVMSOptions ¶
func WithoutVMS ¶
func WithoutVMS() Option
func WithoutWAL ¶
func WithoutWAL() Option
type VarlogCluster ¶
type VarlogCluster struct {
// contains filtered or unexported fields
}
func NewVarlogCluster ¶
func NewVarlogCluster(t *testing.T, opts ...Option) *VarlogCluster
func (*VarlogCluster) AddLS ¶
func (clus *VarlogCluster) AddLS(t *testing.T, topicID types.TopicID) types.LogStreamID
func (*VarlogCluster) AddLSIncomplete ¶
func (clus *VarlogCluster) AddLSIncomplete(t *testing.T, topicID types.TopicID) types.LogStreamID
func (*VarlogCluster) AddLSWithoutMR ¶
func (clus *VarlogCluster) AddLSWithoutMR(t *testing.T, topicID types.TopicID) types.LogStreamID
func (*VarlogCluster) AddSN ¶
func (clus *VarlogCluster) AddSN(t *testing.T) types.StorageNodeID
func (*VarlogCluster) AppendMR ¶
func (clus *VarlogCluster) AppendMR(t *testing.T)
func (*VarlogCluster) AppendUncommittedLog ¶
func (clus *VarlogCluster) AppendUncommittedLog(t *testing.T, topicID types.TopicID, lsID types.LogStreamID, data []byte)
func (*VarlogCluster) BackupStorageNodeIDOf ¶
func (clus *VarlogCluster) BackupStorageNodeIDOf(t *testing.T, lsID types.LogStreamID) types.StorageNodeID
func (*VarlogCluster) ClientAtIndex ¶
func (*VarlogCluster) ClientRefresh ¶
func (clus *VarlogCluster) ClientRefresh(t *testing.T)
TODO: Use built-in refreshing mechanism in clients instead of this.
func (*VarlogCluster) Close ¶
func (clus *VarlogCluster) Close(t *testing.T)
Close closes all cluster MRs.
func (*VarlogCluster) CloseMRAllForRestart ¶
func (clus *VarlogCluster) CloseMRAllForRestart(t *testing.T)
func (*VarlogCluster) CloseMRClientAt ¶
func (clus *VarlogCluster) CloseMRClientAt(t *testing.T, idx int)
func (*VarlogCluster) CloseSN ¶
func (clus *VarlogCluster) CloseSN(t *testing.T, snID types.StorageNodeID)
func (*VarlogCluster) CloseSNClientOf ¶
func (clus *VarlogCluster) CloseSNClientOf(t *testing.T, snID types.StorageNodeID)
func (*VarlogCluster) ClusterID ¶
func (clus *VarlogCluster) ClusterID() types.ClusterID
func (*VarlogCluster) CommitWithoutMR ¶
func (*VarlogCluster) GetMR ¶
func (clus *VarlogCluster) GetMR(t *testing.T) *metarepos.RaftMetadataRepository
func (*VarlogCluster) GetMRByIndex ¶
func (clus *VarlogCluster) GetMRByIndex(t *testing.T, idx int) *metarepos.RaftMetadataRepository
func (*VarlogCluster) GetMetadata ¶
func (clus *VarlogCluster) GetMetadata(t *testing.T) *varlogpb.MetadataDescriptor
func (*VarlogCluster) GetUncommittedLLSNOffset ¶
func (clus *VarlogCluster) GetUncommittedLLSNOffset(t *testing.T, lsID types.LogStreamID) types.LLSN
func (*VarlogCluster) GetVMS ¶
func (clus *VarlogCluster) GetVMS() *admin.Admin
func (*VarlogCluster) GetVMSClient ¶
func (clus *VarlogCluster) GetVMSClient(t *testing.T) varlog.Admin
func (*VarlogCluster) HealthCheckForMR ¶
func (clus *VarlogCluster) HealthCheckForMR(t *testing.T)
func (*VarlogCluster) IndexOfLeaderMR ¶
func (clus *VarlogCluster) IndexOfLeaderMR() int
func (*VarlogCluster) LeaderFail ¶
func (clus *VarlogCluster) LeaderFail(t *testing.T)
func (*VarlogCluster) LogStreamID ¶
func (clus *VarlogCluster) LogStreamID(t *testing.T, topicID types.TopicID, idx int) types.LogStreamID
func (*VarlogCluster) LogStreamIDs ¶
func (clus *VarlogCluster) LogStreamIDs(topicID types.TopicID) []types.LogStreamID
func (*VarlogCluster) Logger ¶
func (clus *VarlogCluster) Logger() *zap.Logger
func (*VarlogCluster) LookupMR ¶
func (clus *VarlogCluster) LookupMR(nodeID types.NodeID) (*metarepos.RaftMetadataRepository, bool)
func (*VarlogCluster) LookupSN ¶
func (clus *VarlogCluster) LookupSN(t *testing.T, snID types.StorageNodeID) *storagenode.StorageNode
func (*VarlogCluster) MRClientAt ¶
func (clus *VarlogCluster) MRClientAt(t *testing.T, idx int) mrc.MetadataRepositoryClient
func (*VarlogCluster) MRManagementClientAt ¶
func (clus *VarlogCluster) MRManagementClientAt(t *testing.T, idx int) mrc.MetadataRepositoryManagementClient
func (*VarlogCluster) MRPeerAtIndex ¶
func (clus *VarlogCluster) MRPeerAtIndex(t *testing.T, idx int) string
func (*VarlogCluster) MRPeers ¶
func (clus *VarlogCluster) MRPeers() []string
func (*VarlogCluster) MRRPCEndpointAtIndex ¶
func (clus *VarlogCluster) MRRPCEndpointAtIndex(t *testing.T, idx int) string
func (*VarlogCluster) MRRPCEndpoints ¶
func (clus *VarlogCluster) MRRPCEndpoints() []string
func (*VarlogCluster) MetadataRepositories ¶
func (clus *VarlogCluster) MetadataRepositories() []*metarepos.RaftMetadataRepository
func (*VarlogCluster) MetadataRepositoryIDAt ¶
func (*VarlogCluster) MetadataRepositoryIDs ¶
func (clus *VarlogCluster) MetadataRepositoryIDs() []types.NodeID
func (*VarlogCluster) NewMRClient ¶
func (clus *VarlogCluster) NewMRClient(t *testing.T, idx int)
func (*VarlogCluster) NewReportCommitterClient ¶
func (clus *VarlogCluster) NewReportCommitterClient(t *testing.T, snID types.StorageNodeID)
func (*VarlogCluster) NewSNClient ¶
func (clus *VarlogCluster) NewSNClient(t *testing.T, snID types.StorageNodeID)
func (*VarlogCluster) NumberOfClients ¶
func (clus *VarlogCluster) NumberOfClients() int
func (*VarlogCluster) NumberOfLogStreams ¶
func (clus *VarlogCluster) NumberOfLogStreams(topicID types.TopicID) int
func (*VarlogCluster) NumberOfMetadataRepositories ¶
func (clus *VarlogCluster) NumberOfMetadataRepositories() int
func (*VarlogCluster) NumberOfStorageNodes ¶
func (clus *VarlogCluster) NumberOfStorageNodes() int
func (*VarlogCluster) PrimaryStorageNodeIDOf ¶
func (clus *VarlogCluster) PrimaryStorageNodeIDOf(t *testing.T, lsID types.LogStreamID) types.StorageNodeID
func (*VarlogCluster) RecoverMR ¶
func (clus *VarlogCluster) RecoverMR(t *testing.T)
func (*VarlogCluster) RecoverSN ¶
func (clus *VarlogCluster) RecoverSN(t *testing.T, snID types.StorageNodeID) *storagenode.StorageNode
FIXME: Extract common codes between AddSN.
func (*VarlogCluster) ReplicasOf ¶
func (clus *VarlogCluster) ReplicasOf(t *testing.T, lsID types.LogStreamID) []varlogpb.ReplicaDescriptor
TODO (jun): non-nullable slice of replica descriptors
func (*VarlogCluster) ReplicationFactor ¶
func (clus *VarlogCluster) ReplicationFactor() int
func (*VarlogCluster) ReportCommitterClientOf ¶
func (clus *VarlogCluster) ReportCommitterClientOf(t *testing.T, snID types.StorageNodeID) reportcommitter.Client
func (*VarlogCluster) SNClientOf ¶
func (clus *VarlogCluster) SNClientOf(t *testing.T, snID types.StorageNodeID) client.StorageNodeManagementClient
func (*VarlogCluster) StartVMS ¶
func (clus *VarlogCluster) StartVMS(t *testing.T)
func (*VarlogCluster) StorageNodeIDAtIndex ¶
func (clus *VarlogCluster) StorageNodeIDAtIndex(t *testing.T, idx int) types.StorageNodeID
func (*VarlogCluster) StorageNodes ¶
func (clus *VarlogCluster) StorageNodes() map[types.StorageNodeID]*storagenode.StorageNode
func (*VarlogCluster) StorageNodesManagementClients ¶
func (clus *VarlogCluster) StorageNodesManagementClients() map[types.StorageNodeID]client.StorageNodeManagementClient
func (*VarlogCluster) TopicIDs ¶
func (clus *VarlogCluster) TopicIDs() []types.TopicID
func (*VarlogCluster) UnsealWithoutMR ¶
func (clus *VarlogCluster) UnsealWithoutMR(t *testing.T, topicID types.TopicID, logStreamID types.LogStreamID, expectedHighWatermark types.GLSN)
func (*VarlogCluster) UpdateLS ¶
func (clus *VarlogCluster) UpdateLS(t *testing.T, tpID types.TopicID, lsID types.LogStreamID, oldsn, newsn types.StorageNodeID)
func (*VarlogCluster) UpdateLSWithoutMR ¶
func (clus *VarlogCluster) UpdateLSWithoutMR(t *testing.T, topicID types.TopicID, logStreamID types.LogStreamID, storageNodeID types.StorageNodeID, clear bool)
func (*VarlogCluster) WaitCommit ¶
func (clus *VarlogCluster) WaitCommit(t *testing.T, lsID types.LogStreamID, version types.Version)
func (*VarlogCluster) WaitSealed ¶
func (clus *VarlogCluster) WaitSealed(t *testing.T, lsID types.LogStreamID)
Click to show internal directories.
Click to hide internal directories.