...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package types
17
18 import (
19 "context"
20
21 "sigs.k8s.io/controller-runtime/pkg/client"
22
23 "github.com/chaos-mesh/chaos-mesh/api/v1alpha1"
24 )
25
26 type ChaosImpl interface {
27 Apply(ctx context.Context, index int, records []*v1alpha1.Record, obj v1alpha1.InnerObject) (v1alpha1.Phase, error)
28 Recover(ctx context.Context, index int, records []*v1alpha1.Record, obj v1alpha1.InnerObject) (v1alpha1.Phase, error)
29 }
30
31 type ChaosImplPair struct {
32 Name string
33 Object v1alpha1.InnerObjectWithSelector
34 Impl ChaosImpl
35
36 ObjectList v1alpha1.GenericChaosList
37 Controlls []client.Object
38 }
39