chaos

package
v0.0.25 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2021 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package chaos handles the setup necessary to run chaos tests across chainlnk nodes and blockchains

Index

Constants

View Source
const (
	// APIBasePath in form of /apis/<spec.group>/<spec.versions.name>, see Chaosmesh CRD 2.0.0
	APIBasePath = "/apis/chaos-mesh.org/v1alpha1"
	// TemplatesPath path to the chaos templates
	TemplatesPath = "client/chaos/templates"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Client    *kubernetes.Clientset
	Namespace string
}

Config Chaosmesh controller config

type Controller

type Controller struct {
	Client   *kubernetes.Clientset
	Requests map[string]*rest.Request
	Cfg      *Config
}

Controller is controller that manages Chaosmesh CRD instances to run experiments

func NewController

func NewController(cfg *Config) (*Controller, error)

NewController creates controller to run and stop chaos experiments

func (*Controller) Run

func (c *Controller) Run(exp Experimentable) (string, error)

Run runs experiment and saves it's ID

func (*Controller) Stop

func (c *Controller) Stop(name string) error

Stop removes experiment's entity

func (*Controller) StopAll

func (c *Controller) StopAll() error

StopAll removes all experiments entities

type Experimentable

type Experimentable interface {
	SetBase(base experiments.Base)
	Filename() string
	Resource() string
}

Experimentable interface for chaos experiments

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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