config

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bots

type Bots struct {
	CACert     string `yaml:"ca_cert,omitempty"`
	PublicCert string `yaml:"public_cert,omitempty"`
	PeerToken  string `yaml:"peer_token"`
}

type Config

type Config struct {
	APIOptions     *RestAPIOptions   `yaml:"api_options"`
	JobsFromConfig []*JobsFromConfig `yaml:"jobs,flow"`
	Bots           *Bots             `yaml:"bots,flow"`
	HealthCheck    *HealthCheck      `yaml:"health_check,flow"`
}

func GetConfig

func GetConfig(file string) (*Config, error)

func (*Config) GetJobMap

func (config *Config) GetJobMap(loggers chaoslogger.Loggers) map[string]*Job

type FailureType

type FailureType string
const (
	Docker  FailureType = "Docker"
	Service FailureType = "Service"
	CPU     FailureType = "CPU"
	Server  FailureType = "Server"
	Network FailureType = "Network"
)

type HealthCheck

type HealthCheck struct {
	Active bool `yaml:"active,flow"`
	Report bool `yaml:"report,flow"`
}

type Job

type Job struct {
	ComponentName string
	FailureType   FailureType
	Target        []string
}

type JobsFromConfig

type JobsFromConfig struct {
	JobName       string      `yaml:"job_name"`
	FailureType   FailureType `yaml:"type"`
	ComponentName string      `yaml:"component_name,omitempty"`
	Targets       []string    `yaml:"targets,omitempty"`
}

type RestAPIOptions

type RestAPIOptions struct {
	Port   string `yaml:"port"`
	Scheme string `yaml:"scheme"`
}

Jump to

Keyboard shortcuts

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