Documentation ¶
Index ¶
- func AnyBackupSNFail(tc cluster.Cluster, snid *types.StorageNodeID, nodeName *string) func(context.Context, *testing.T) bool
- func FailStorageNode(ctx context.Context, t *testing.T, tc cluster.Cluster, ...) func()
- func InitLogStream(ctx context.Context, tc cluster.Cluster, num int) func(*testing.T, *Action)
- func NewCluster(t *testing.T, opts ...cluster.Option) cluster.Cluster
- func StartStorageNode(tc cluster.Cluster, nodeNameGetter func() string) func(context.Context, *testing.T) bool
- func WaitStorageNodeFail(c cluster.Cluster, nodeNameGetter func() string) func(context.Context, *testing.T) bool
- type Action
- type ActionOption
- func WithClusterID(cid types.ClusterID) ActionOption
- func WithConfChange(confChanger ConfChanger) ActionOption
- func WithMRAddr(mrAddr string) ActionOption
- func WithNumClient(nrCli int) ActionOption
- func WithNumRepeats(numRepeats int) ActionOption
- func WithNumSubscriber(nrSub int) ActionOption
- func WithPostHook(postHook func(*testing.T, *Action)) ActionOption
- func WithPreHook(preHook func(*testing.T, *Action)) ActionOption
- func WithTitle(title string) ActionOption
- type ConfChanger
- type ConfChangerOption
- type LoggerOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AnyBackupSNFail ¶
func FailStorageNode ¶
func InitLogStream ¶
func NewCluster ¶ added in v0.7.0
func StartStorageNode ¶
Types ¶
type Action ¶
type Action struct {
// contains filtered or unexported fields
}
Action tests basic APIs of the Varlog, which are Append, AppendTo, Subscribe, and SubscribeTo while doing reconfigurations of the cluster.
func NewAction ¶
func NewAction(t *testing.T, opts ...ActionOption) *Action
NewAction creates a new Action. Users should define all reconfigurations to cluster by using ConfChanger.
func (*Action) AddLogStream ¶
func (action *Action) AddLogStream(tpid types.TopicID, lsid types.LogStreamID)
AddLogStream adds a new log stream to the Action while running. It allows knowing log streams added in runtime.
type ActionOption ¶
type ActionOption interface {
// contains filtered or unexported methods
}
func WithClusterID ¶
func WithClusterID(cid types.ClusterID) ActionOption
func WithConfChange ¶
func WithConfChange(confChanger ConfChanger) ActionOption
func WithMRAddr ¶
func WithMRAddr(mrAddr string) ActionOption
func WithNumClient ¶
func WithNumClient(nrCli int) ActionOption
func WithNumRepeats ¶
func WithNumRepeats(numRepeats int) ActionOption
func WithNumSubscriber ¶
func WithNumSubscriber(nrSub int) ActionOption
func WithPostHook ¶
func WithPostHook(postHook func(*testing.T, *Action)) ActionOption
func WithPreHook ¶
func WithPreHook(preHook func(*testing.T, *Action)) ActionOption
func WithTitle ¶
func WithTitle(title string) ActionOption
type ConfChanger ¶
func NewConfChanger ¶
func NewConfChanger(opts ...ConfChangerOption) ConfChanger
type ConfChangerOption ¶
type ConfChangerOption interface {
// contains filtered or unexported methods
}
func WithChangeFunc ¶
func WithCheckFunc ¶
func WithConfChangeInterval ¶
func WithConfChangeInterval(dur time.Duration) ConfChangerOption
func WithName ¶
func WithName(name string) ConfChangerOption
type LoggerOption ¶
type LoggerOption interface { ActionOption ConfChangerOption }
func WithLogger ¶
func WithLogger(logger *zap.Logger) LoggerOption
Source Files ¶
Click to show internal directories.
Click to hide internal directories.