Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddRemovePolicy ¶
type AddRemovePolicy struct {
// contains filtered or unexported fields
}
AddRemovePolicy removes a node from the cluster, wipes it's data directory and it back to the cluster as a new node.
func (*AddRemovePolicy) Inject ¶
func (d *AddRemovePolicy) Inject( ctx context.Context, tc *cluster.TestCluster, ) (time.Duration, error)
Inject injects the failure policy.
func (*AddRemovePolicy) Recover ¶
func (d *AddRemovePolicy) Recover(ctx context.Context, tc *cluster.TestCluster) error
Recover recovers from the failure policy.
func (*AddRemovePolicy) String ¶
func (d *AddRemovePolicy) String() string
type DriftAllPolicy ¶
type DriftAllPolicy struct{}
DriftAllPolicy introduces drift on all the nodes part of kronos cluster.
func (*DriftAllPolicy) Inject ¶
func (d *DriftAllPolicy) Inject( ctx context.Context, tc *cluster.TestCluster, ) (time.Duration, error)
Inject injects the failure policy.
func (*DriftAllPolicy) Recover ¶
func (d *DriftAllPolicy) Recover(ctx context.Context, tc *cluster.TestCluster) error
Recover recovers from the failure policy.
func (*DriftAllPolicy) String ¶
func (d *DriftAllPolicy) String() string
type DriftOraclePolicy ¶
type DriftOraclePolicy struct{}
DriftOraclePolicy introduces drift in the time of the oracle.
func (*DriftOraclePolicy) Inject ¶
func (d *DriftOraclePolicy) Inject( ctx context.Context, tc *cluster.TestCluster, ) (time.Duration, error)
Inject injects the failure policy.
func (*DriftOraclePolicy) Recover ¶
func (d *DriftOraclePolicy) Recover(ctx context.Context, tc *cluster.TestCluster) error
Recover recovers from the failure policy.
func (*DriftOraclePolicy) String ¶
func (d *DriftOraclePolicy) String() string
type Policy ¶
type Policy interface { Inject(ctx context.Context, tc *cluster.TestCluster) (time.Duration, error) Recover(ctx context.Context, tc *cluster.TestCluster) error String() string }
Policy describes the chaos policies that we inject while we are testing the cluster.
type RestartAllPolicy ¶
type RestartAllPolicy struct{}
RestartAllPolicy restart all the nodes part of kronos cluster.
func (*RestartAllPolicy) Inject ¶
func (r *RestartAllPolicy) Inject( ctx context.Context, tc *cluster.TestCluster, ) (time.Duration, error)
Inject injects the failure policy.
func (*RestartAllPolicy) Recover ¶
func (r *RestartAllPolicy) Recover(ctx context.Context, tc *cluster.TestCluster) error
Recover recovers from the failure policy.
func (*RestartAllPolicy) String ¶
func (r *RestartAllPolicy) String() string
type RestartOraclePolicy ¶
type RestartOraclePolicy struct{}
RestartOraclePolicy restarts the oracle.
func (*RestartOraclePolicy) Inject ¶
func (r *RestartOraclePolicy) Inject( ctx context.Context, tc *cluster.TestCluster, ) (time.Duration, error)
Inject injects the failure policy.
func (*RestartOraclePolicy) Recover ¶
func (r *RestartOraclePolicy) Recover(ctx context.Context, tc *cluster.TestCluster) error
Recover recovers from the failure policy.
func (*RestartOraclePolicy) String ¶
func (r *RestartOraclePolicy) String() string
type StopAnySubsetPolicy ¶
type StopAnySubsetPolicy struct { MaxNodeFailuresAllowed int // contains filtered or unexported fields }
StopAnySubsetPolicy stops any subset of nodes in the cluster. Only MaxNodeFailuresAllowed are allowed to be stopped together.
func (*StopAnySubsetPolicy) Inject ¶
func (s *StopAnySubsetPolicy) Inject( ctx context.Context, tc *cluster.TestCluster, ) (time.Duration, error)
Inject injects the failure policy.
func (*StopAnySubsetPolicy) Recover ¶
func (s *StopAnySubsetPolicy) Recover(ctx context.Context, tc *cluster.TestCluster) error
Recover recovers from the failure policy.
func (*StopAnySubsetPolicy) String ¶
func (s *StopAnySubsetPolicy) String() string
type StopOraclePolicy ¶
type StopOraclePolicy struct {
// contains filtered or unexported fields
}
StopOraclePolicy stops the oracle node.
func (*StopOraclePolicy) Inject ¶
func (s *StopOraclePolicy) Inject( ctx context.Context, tc *cluster.TestCluster, ) (time.Duration, error)
Inject injects the failure policy.
func (*StopOraclePolicy) Recover ¶
func (s *StopOraclePolicy) Recover(ctx context.Context, tc *cluster.TestCluster) error
Recover recovers from the failure policy.
func (*StopOraclePolicy) String ¶
func (s *StopOraclePolicy) String() string