Documentation ¶
Index ¶
- Constants
- Variables
- func GetChaosBladeByName(name, kubeconfig string) (result *v1alpha1.ChaosBlade, err error)
- func NewCommandModelSpec() spec.ExpModelCommandSpec
- func NewExecutor() spec.Executor
- func QueryStatus(ctx context.Context, operation, kubeconfig string) (*spec.Response, bool)
- func RemoveFinalizer(name, kubeconfig string) error
- type CommandModelSpec
- type ComposeExecutor
- type ComposeExecutorForK8s
- type Executor
- type StatusResult
Constants ¶
View Source
const ( QueryCreate = "create" QueryDestroy = "destroy" DefaultWaitingTime = "20s" )
Variables ¶
View Source
var KubeConfigFlag = &spec.ExpFlag{
Name: "kubeconfig",
Desc: "kubeconfig file",
}
View Source
var WaitingTimeFlag = &spec.ExpFlag{
Name: "waiting-time",
Desc: "Waiting time for invoking, default value is 20s",
}
Functions ¶
func GetChaosBladeByName ¶ added in v0.6.0
func GetChaosBladeByName(name, kubeconfig string) (result *v1alpha1.ChaosBlade, err error)
func NewCommandModelSpec ¶ added in v0.4.0
func NewCommandModelSpec() spec.ExpModelCommandSpec
func NewExecutor ¶ added in v0.4.0
func QueryStatus ¶ added in v0.4.0
func RemoveFinalizer ¶ added in v0.6.0
Types ¶
type CommandModelSpec ¶
type CommandModelSpec struct {
spec.BaseExpModelCommandSpec
}
func (*CommandModelSpec) Example ¶
func (*CommandModelSpec) Example() string
func (*CommandModelSpec) LongDesc ¶
func (*CommandModelSpec) LongDesc() string
func (*CommandModelSpec) Name ¶
func (*CommandModelSpec) Name() string
func (*CommandModelSpec) ShortDesc ¶
func (*CommandModelSpec) ShortDesc() string
type ComposeExecutor ¶ added in v0.7.0
func NewComposeExecutor ¶ added in v0.7.0
func NewComposeExecutor() ComposeExecutor
type ComposeExecutorForK8s ¶ added in v0.7.0
type ComposeExecutorForK8s struct {
// contains filtered or unexported fields
}
func (*ComposeExecutorForK8s) Name ¶ added in v0.7.0
func (*ComposeExecutorForK8s) Name() string
func (*ComposeExecutorForK8s) SetChannel ¶ added in v0.7.0
func (*ComposeExecutorForK8s) SetChannel(channel spec.Channel)
type StatusResult ¶ added in v0.4.0
type StatusResult struct { Uid string `json:"uid"` Success bool `json:"success"` Error string `json:"error"` Statuses []v1alpha1.ResourceStatus `json:"statuses"` }
func CreateConfirmDestroyedStatusResult ¶ added in v0.4.0
func CreateConfirmDestroyedStatusResult(uid string) StatusResult
func CreateConfirmFailedStatusResult ¶ added in v0.4.0
func CreateConfirmFailedStatusResult(uid, errMsg string) StatusResult
func CreateStatusResult ¶ added in v0.4.0
func CreateStatusResult(uid string, success bool, errMsg string, expStatus []v1alpha1.ExperimentStatus) StatusResult
Click to show internal directories.
Click to hide internal directories.