Documentation ¶
Index ¶
- Variables
- func ExecRoot(ctx context.Context, qCtx *handler.Context, logger *zap.Logger, ...) error
- func NagateMatcher(m handler.Matcher) handler.Matcher
- type BatchMatherAnd
- type BatchMatherOr
- 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 BatchMatherAnd ¶ added in v1.8.5
type BatchMatherOr ¶ added in v1.8.5
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)
ParseExecutableCmd parses in into a ExecutableCmd. in can be: a handler.Executable or a handler.ESExecutable or a string or a map[string]interface{}, which can be parsed to FallbackConfig, ParallelECSConfig or IfBlockConfig, or a slice of all of above.
type ExecutableCmdSequence ¶
type ExecutableCmdSequence []ExecutableCmd
func ParseExecutableCmdSequence ¶
func ParseExecutableCmdSequence(in []interface{}) (ExecutableCmdSequence, error)
type FallbackConfig ¶
type FallbackConfig struct { // Primary exec sequence. Primary interface{} `yaml:"primary"` // Secondary exec sequence. 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 { // Available type are string and handler.Matcher, or a slice of them. If interface{} `yaml:"if"` // Available type are string and handler.Matcher, or a slice of them. IfAnd interface{} `yaml:"if_and"` // See ParseExecutableCmd. Exec interface{} `yaml:"exec"` }
IfBlockConfig is a config to build a IfBlock.
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.