model

package
v0.0.0-...-6e2cd59 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Validate

func Validate(t reflect.Type, blob []byte) error

Validate checks if blob can be unmarshalled into valid struct of type t

Types

type ChaosID

type ChaosID string

type ChaosInstance

type ChaosInstance struct {
	ID        ChaosID
	Namespace string            // Required
	Selectors map[string]string // Required
	Timeout   uint64            // Required
	Count     int               // Required
}

type ChaosResult

type ChaosResult struct {
	Status      ChaosStatus
	DeletedPods []string
	Error       string
}

type ChaosStatus

type ChaosStatus string
const (
	ChaosFail    ChaosStatus = "failed"
	ChaosSuccess ChaosStatus = "success"
)

type ErrorTrace

type ErrorTrace struct {
	// contains filtered or unexported fields
}

ErrorTrace stores info about what went wrong during the validation check

func (*ErrorTrace) Error

func (et *ErrorTrace) Error() string

type Job

type Job struct {
	ID         JobID
	Name       string
	Group      string
	Priority   int
	Env        map[string]string
	Config     []string
	Frequency  uint64
	Duration   uint64
	HTTPMethod string
	HTTPUrl    string
}

type JobID

type JobID string

type Test

type Test struct {
	ID    TestID
	Name  string
	Jobs  []Job
	Chaos []ChaosInstance
}

type TestID

type TestID string

type TestInstance

type TestInstance struct {
	ID          TestInstanceID
	TestID      TestID
	Type        string
	Status      string
	CreatedAt   int64
	Metrics     interface{} // TODO: decide how to store metrics long-term
	ChaosResult map[ChaosID]ChaosResult
	Error       string
}

func (*TestInstance) IsTerminal

func (instance *TestInstance) IsTerminal() bool

type TestInstanceID

type TestInstanceID string

type TestSchedule

type TestSchedule struct {
	ID       TestScheduleID
	Name     string `validation:"required"`
	TestID   TestID `validation:"required"`
	CronSpec string `validation:"required"`
}

type TestScheduleID

type TestScheduleID string

Jump to

Keyboard shortcuts

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