Documentation
¶
Index ¶
- func Args(args ...string) *optionArgs
- func Async() *optionAsync
- func Bootstrap(constructor constructor, opts ...option) (err error)
- func Break() *optionBreak
- func Configs(configs ...string) *optionConfigs
- func Continue() *optionBreak
- func Dir(dir string) *optionDir
- func Fields(fields ...gox.Field) *optionFields
- func Interrupt() *optionRetry
- func Name(name string) *optionName
- func NewOptions(options ...option) []option
- func Retry() *optionRetry
- func Sync() *optionAsync
- type Base
- func (b *Base) Base() *Base
- func (b *Base) Exec(command string, opts ...execOption) (err error)
- func (b *Base) Fields() gox.Fields
- func (b *Base) Parse(to map[string]string, configs ...string)
- func (b *Base) Parses(to map[string][]string, configs ...string)
- func (b *Base) Setup() (unset bool, err error)
- type Config
- type Plugin
- type Step
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Base ¶ added in v0.1.0
type Base struct {
simaqian.Logger
// 是否启用默认配置
Defaults bool `default:"${PLUGIN_DEFAULTS=${DEFAULTS=true}}"`
// 是否显示详细信息
Verbose bool `default:"${PLUGIN_VERBOSE=${VERBOSE=false}}"`
// 是否显示调试信息
Debug bool `default:"${PLUGIN_DEBUG=${DEBUG=false}}"`
// 是否重试
Retry bool `default:"${PLUGIN_RETRY=${RETRY=true}}"`
// 重试次数
Counts int `default:"${PLUGIN_COUNTS=${COUNTS=5}}"`
// 重试间隔
Backoff time.Duration `default:"${PLUGIN_BACKOFF=${BACKOFF=5s}}"`
}
Base 插件基础配置
type Config ¶
type Config interface {
// Setup 设置配置信息
Setup() (unset bool, err error)
// Fields 导出所有字段
Fields() gox.Fields
// Base 基础配置
Base() *Base
}
Config 配置
Click to show internal directories.
Click to hide internal directories.