Documentation ¶
Index ¶
- func NewContainerKillGenerator(name string) core.NemesisGenerator
- func NewCoordinationKillGenerator(nodes []cluster.Node) (core.NemesisGenerator, *core.NemesisControl)
- func NewIOChaosGenerator(name string) core.NemesisGenerator
- func NewKillGenerator(name string) core.NemesisGenerator
- func NewLeaderShuffleGenerator(name string) *leaderShuffleGenerator
- func NewNetemChaos(name string) core.NemesisGenerator
- func NewNetworkPartitionGenerator(name string) core.NemesisGenerator
- func NewPodKillGenerator(name string) core.NemesisGenerator
- func NewScalingGenerator(name string) core.NemesisGenerator
- func NewSchedulerGenerator(name string) *schedulerGenerator
- func NewTimeChaos(name string) core.NemesisGenerator
- type Chaos
- func (c *Chaos) ApplyIOChaos(ioc *v1alpha1.IoChaos) error
- func (c *Chaos) ApplyNetChaos(nc *v1alpha1.NetworkChaos) error
- func (c *Chaos) ApplyPodChaos(ctx context.Context, pc *v1alpha1.PodChaos) error
- func (c *Chaos) ApplyTimeChaos(ctx context.Context, pc *v1alpha1.TimeChaos) error
- func (c *Chaos) CancelIOChaos(ioc *v1alpha1.IoChaos) error
- func (c *Chaos) CancelNetChaos(nc *v1alpha1.NetworkChaos) error
- func (c *Chaos) CancelPodChaos(ctx context.Context, pc *v1alpha1.PodChaos) error
- func (c *Chaos) CancelTimeChaos(ctx context.Context, pc *v1alpha1.TimeChaos) error
- type IOChaosGenerator
- type LeaderShuffler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewContainerKillGenerator ¶
func NewContainerKillGenerator(name string) core.NemesisGenerator
NewContainerKillGenerator creates a generator.
func NewCoordinationKillGenerator ¶
func NewCoordinationKillGenerator(nodes []cluster.Node) (core.NemesisGenerator, *core.NemesisControl)
NewCoordinationKillGenerator ...
func NewIOChaosGenerator ¶
func NewIOChaosGenerator(name string) core.NemesisGenerator
NewIOChaosGenerator create an io chaos.
func NewKillGenerator ¶
func NewKillGenerator(name string) core.NemesisGenerator
NewKillGenerator creates a generator. Name is random_kill, minor_kill, major_kill, and all_kill.
func NewLeaderShuffleGenerator ¶
func NewLeaderShuffleGenerator(name string) *leaderShuffleGenerator
NewLeaderShuffleGenerator ...
func NewNetemChaos ¶
func NewNetemChaos(name string) core.NemesisGenerator
NewNetemChaos create a netem chaos.
func NewNetworkPartitionGenerator ¶
func NewNetworkPartitionGenerator(name string) core.NemesisGenerator
NewNetworkPartitionGenerator creates a generator. Name is partition-one, etc.
func NewPodKillGenerator ¶
func NewPodKillGenerator(name string) core.NemesisGenerator
NewPodKillGenerator creates a generator.
func NewScalingGenerator ¶
func NewScalingGenerator(name string) core.NemesisGenerator
NewScalingGenerator creates a generator.
func NewSchedulerGenerator ¶
func NewSchedulerGenerator(name string) *schedulerGenerator
NewSchedulerGenerator ...
func NewTimeChaos ¶
func NewTimeChaos(name string) core.NemesisGenerator
NewTimeChaos generate a time chaos.
Types ¶
type Chaos ¶
type Chaos struct {
// contains filtered or unexported fields
}
Chaos knows how to operate the chaos provided by pingcap/chaos-mesh
func (*Chaos) ApplyIOChaos ¶
ApplyIOChaos run an io-chaos.
func (*Chaos) ApplyNetChaos ¶
func (c *Chaos) ApplyNetChaos(nc *v1alpha1.NetworkChaos) error
ApplyNetChaos apply the chaos to cluster using Client.
func (*Chaos) ApplyPodChaos ¶
ApplyPodChaos apply the pod chaos to cluster using Client.
func (*Chaos) ApplyTimeChaos ¶
ApplyTimeChaos apply the pod chaos to cluster using Client.
func (*Chaos) CancelIOChaos ¶
CancelIOChaos cancel the io chaos.
func (*Chaos) CancelNetChaos ¶
func (c *Chaos) CancelNetChaos(nc *v1alpha1.NetworkChaos) error
CancelNetChaos apply the chaos to cluster using Client.
func (*Chaos) CancelPodChaos ¶
CancelPodChaos Delete the pod chaos using Client.
type IOChaosGenerator ¶
type IOChaosGenerator struct {
// contains filtered or unexported fields
}
IOChaosGenerator ...
func (IOChaosGenerator) Generate ¶
func (g IOChaosGenerator) Generate(nodes []cluster.Node) []*core.NemesisOperation
Generate generates nemesises based on nemesis type.
type LeaderShuffler ¶
LeaderShuffler creates operators in PD to schedule the region containing the regionKey.
func NewLeaderShuffler ¶
func NewLeaderShuffler(pdAddr string, regionKey string) *LeaderShuffler
NewLeaderShuffler creates a LeaderShuffler to schedule the region containing the regionKey.
func (LeaderShuffler) Name ¶
func (l LeaderShuffler) Name() string
Name implements Nemesis.Name that returns the unique name for the nemesis.
func (*LeaderShuffler) Recover ¶
func (l *LeaderShuffler) Recover(ctx context.Context, node *cluster.Node, args ...interface{}) error
Recover implements Nemesis.Recover that recovers the nemesis.
func (*LeaderShuffler) ShuffleLeader ¶
func (l *LeaderShuffler) ShuffleLeader() error
ShuffleLeader create a operator in PD to schedule the region.