Documentation ¶
Index ¶
- Variables
- func ExecRoot(ctx context.Context, qCtx *handler.Context, logger *zap.Logger, ...) error
- func NagateMatcher(m handler.Matcher) handler.Matcher
- type ExecutableCmd
- type ExecutableCmdSequence
- type FallbackConfig
- type FallbackECS
- type IfBlock
- type IfBlockConfig
- type NagativeMatcher
- type ParallelECS
- type ParallelECSConfig
- type RefESExecutablePlugin
- type RefMatcherPlugin
Constants ¶
This section is empty.
Variables ¶
View Source
var EarlyStop earlyStop
EarlyStop is a noop ExecutableCmd that returns earlyStop == true.
Functions ¶
Types ¶
type ExecutableCmd ¶
type ExecutableCmd interface {
ExecCmd(ctx context.Context, qCtx *handler.Context, logger *zap.Logger) (earlyStop bool, err error)
}
func ParseExecutableCmd ¶ added in v1.5.0
func ParseExecutableCmd(in interface{}) (ExecutableCmd, 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) (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)
type IfBlock ¶
type IfBlock struct { IfMatcher []handler.Matcher IfAndMatcher []handler.Matcher ExecutableCmd ExecutableCmd }
func ParseIfBlock ¶
func ParseIfBlock(c *IfBlockConfig) (*IfBlock, error)
type IfBlockConfig ¶
type IfBlockConfig struct { If []string `yaml:"if"` IfAnd []string `yaml:"if_and"` Exec []interface{} `yaml:"exec"` Goto string `yaml:"goto"` // Deprecated, use Exec + EarlyStop instead. }
IfBlockConfig can build a IfBlock from human input.
type NagativeMatcher ¶ added in v1.5.0
type NagativeMatcher struct {
// contains filtered or unexported fields
}
type ParallelECS ¶
type ParallelECS struct {
// contains filtered or unexported fields
}
func ParseParallelECS ¶
func ParseParallelECS(c *ParallelECSConfig) (*ParallelECS, error)
type ParallelECSConfig ¶
type ParallelECSConfig struct { Parallel [][]interface{} `yaml:"parallel"` Timeout uint `yaml:"timeout"` }
type RefESExecutablePlugin ¶ added in v1.5.0
type RefESExecutablePlugin string
RefESExecutablePlugin is a handler.ESExecutablePlugin reference tag.
Click to show internal directories.
Click to hide internal directories.