kubernetes

package
v1.7.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 25, 2023 License: Apache-2.0 Imports: 17 Imported by: 1

Documentation

Index

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 NewExecutor() spec.Executor

func QueryStatus added in v0.4.0

func QueryStatus(ctx context.Context, operation, kubeconfig string) (*spec.Response, bool)

func RemoveFinalizer added in v0.6.0

func RemoveFinalizer(name, kubeconfig string) error

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

type ComposeExecutor interface {
	spec.Executor
}

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) Exec added in v0.7.0

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 Executor

type Executor struct {
}

func (*Executor) Exec

func (e *Executor) Exec(uid string, ctx context.Context, expModel *spec.ExpModel) *spec.Response

func (*Executor) Name

func (*Executor) Name() string

func (*Executor) SetChannel

func (e *Executor) 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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL