types

package
v0.0.0-...-2951e66 Latest Latest
Warning

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

Go to latest
Published: May 12, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Delay

func Delay(d int)

Types

type Capture

type Capture struct {
	FieldNumber []int  `yaml:"field_number"`
	Separator   string `yaml:"separator"`
	Occurrence  int    `yaml:"occurrence"`
	Values      map[int]interface{}
}

type CapturedValue

type CapturedValue struct {
	FieldNumber int    `yaml:"field_number"`
	Operation   string `yaml:"operation"`
	Value       string `yaml:"value"`
	Result      interface{}
}

type CmdResult

type CmdResult struct {
	Cmd            string
	Result         []byte
	CapturedValues map[int]interface{}
}

type Collect

type Collect struct {
	HealthCheck bool `yaml:"health_check"`
}

type Command

type Command struct {
	Cmd           string     `yaml:"command"`
	Times         int        `yaml:"times"`
	Interval      int        `yaml:"interval"`
	WaitBefore    int        `yaml:"wait_before"`
	WaitAfter     int        `yaml:"wait_after"`
	Location      []string   `yaml:"location"`
	Debug         bool       `yaml:"debug"`
	ProcessResult bool       `yaml:"process_result"`
	Patterns      []*Pattern `yaml:"patterns"`
}

type Commander

type Commander struct {
	MainCommandGroup []*Command `yaml:"main_command_group"`
	Repro            *Repro     `yaml:"repro"`
	Collect          *Collect   `yaml:"collect"`
}

func GetCommands

func GetCommands(fn string) (*Commander, error)

type Pattern

type Pattern struct {
	PatternString            string           `yaml:"pattern_string"`
	Capture                  *Capture         `yaml:"capture"`
	CapturedValuesProcessing []*CapturedValue `yaml:"captured_values"`
	PatternCommands          []*Command       `yaml:"pattern_commands"`
	CheckAllResults          bool             `yaml:"check_all_results"`
	RegExp                   *regexp.Regexp
	ValuesStore              map[int]map[int]interface{}
}

type Repro

type Repro struct {
	Times                    int        `yaml:"times"`
	Interval                 int        `yaml:"interval"`
	CommandProcessingRules   []*Command `yaml:"command_processing_rules"`
	PostMortemCommandGroup   []*Command `yaml:"postmortem_command_group"`
	CapturedValuesProcessing map[string]map[string]map[int]*CapturedValue
	PerCmdPerPatternCommands map[string]map[string][]*Command
}

type Router

type Router interface {
	GetName() string
	GetData(string, bool) ([]byte, error)
	ProcessCommand(*Command, bool) ([]*CmdResult, error)
	Close()
	GetLogger() log.Logger
}

func NewLocalRouter

func NewLocalRouter(router string, li log.Logger) Router

func NewRouter

func NewRouter(rn string, port int, sshConfig *ssh.ClientConfig, l log.Logger) (Router, error)

Jump to

Keyboard shortcuts

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