executable_seq

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2021 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WalkExecutableCmd

func WalkExecutableCmd(ctx context.Context, qCtx *handler.Context, logger *zap.Logger, entry ExecutableCmd) (err error)

WalkExecutableCmd executes the ExecutableCmd, include its `goto`. This should only be used in root cmd node.

Types

type ExecutableCmd

type ExecutableCmd interface {
	ExecCmd(ctx context.Context, qCtx *handler.Context, logger *zap.Logger) (goTwo string, earlyStop bool, err error)
}

type ExecutableCmdSequence

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

func ParseExecutableCmdSequence

func ParseExecutableCmdSequence(in []interface{}) (*ExecutableCmdSequence, error)

func (*ExecutableCmdSequence) ExecCmd

func (es *ExecutableCmdSequence) ExecCmd(ctx context.Context, qCtx *handler.Context, logger *zap.Logger) (goTwo string, earlyStop bool, err error)

ExecCmd executes the sequence.

func (*ExecutableCmdSequence) Len

func (es *ExecutableCmdSequence) Len() int

type FallbackConfig

type FallbackConfig struct {
	// Primary exec sequence, must have at least one element.
	Primary []interface{} `yaml:"primary"`
	// Secondary exec sequence, must have at least one element.
	Secondary []interface{} `yaml:"secondary"`

	StatLength int `yaml:"stat_length"` // An Zero value disables the (normal) fallback.
	Threshold  int `yaml:"threshold"`

	// FastFallback threshold in milliseconds. Zero means fast fallback is disabled.
	FastFallback int `yaml:"fast_fallback"`

	// AlwaysStandby: secondary should always standby in fast fallback.
	AlwaysStandby bool `yaml:"always_standby"`
}

type FallbackECS

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

func ParseFallbackECS

func ParseFallbackECS(c *FallbackConfig) (*FallbackECS, error)

func (*FallbackECS) ExecCmd

func (f *FallbackECS) ExecCmd(ctx context.Context, qCtx *handler.Context, logger *zap.Logger) (goTwo string, earlyStop bool, err error)

type IfBlock

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

func ParseIfBlock

func ParseIfBlock(in map[string]interface{}) (*IfBlock, error)

func (*IfBlock) ExecCmd

func (b *IfBlock) ExecCmd(ctx context.Context, qCtx *handler.Context, logger *zap.Logger) (goTwo string, earlyStop bool, err error)

type IfBlockConfig

type IfBlockConfig struct {
	If    []string      `yaml:"if"`
	IfAnd []string      `yaml:"if_and"`
	Exec  []interface{} `yaml:"exec"`
	Goto  string        `yaml:"goto"`
}

type ParallelECS

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

func ParseParallelECS

func ParseParallelECS(c *ParallelECSConfig) (*ParallelECS, error)

func (*ParallelECS) ExecCmd

func (p *ParallelECS) ExecCmd(ctx context.Context, qCtx *handler.Context, logger *zap.Logger) (goTwo string, earlyStop bool, err error)

type ParallelECSConfig

type ParallelECSConfig struct {
	Parallel [][]interface{} `yaml:"parallel"`
	Timeout  uint            `yaml:"timeout"`
}

Jump to

Keyboard shortcuts

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