Documentation
¶
Index ¶
- func Aliases(aliases ...*alias) *optionAliases
- 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 Contains(contains string) *optionContains
- func Continue() *optionBreak
- func Dir(dir string) *optionDir
- func Equal(equal string) *optionEqual
- func Fields(fields ...gox.Field) *optionFields
- func Interrupt() *optionRetry
- func Name(name string) *optionName
- func NewAlias(name string, value string) *alias
- func NewOptions(options ...option) []option
- func Retry() *optionRetry
- func Sync() *optionAsync
- type Config
- type Plugin
- type PluginBase
- func (pb *PluginBase) Base() *PluginBase
- func (pb *PluginBase) Exec(command string, opts ...execOption) (err error)
- func (pb *PluginBase) Fields() gox.Fields
- func (pb *PluginBase) Parse(to map[string]string, configs ...string)
- func (pb *PluginBase) Parses(to map[string][]string, configs ...string)
- func (pb *PluginBase) Setup() (unset bool, err error)
- type Step
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config interface {
// Setup 设置配置信息
Setup() (unset bool, err error)
// Fields 导出所有字段
Fields() gox.Fields
// Base 基础配置
Base() *PluginBase
}
Config 配置
type PluginBase ¶ added in v0.1.2
type PluginBase 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}}"`
}
PluginBase 插件基础配置
func (*PluginBase) Base ¶ added in v0.1.2
func (pb *PluginBase) Base() *PluginBase
func (*PluginBase) Exec ¶ added in v0.1.2
func (pb *PluginBase) Exec(command string, opts ...execOption) (err error)
func (*PluginBase) Fields ¶ added in v0.1.2
func (pb *PluginBase) Fields() gox.Fields
func (*PluginBase) Parse ¶ added in v0.1.2
func (pb *PluginBase) Parse(to map[string]string, configs ...string)
func (*PluginBase) Parses ¶ added in v0.1.2
func (pb *PluginBase) Parses(to map[string][]string, configs ...string)
func (*PluginBase) Setup ¶ added in v0.1.2
func (pb *PluginBase) Setup() (unset bool, err error)
Source Files
¶
- alias.go
- bootstrap.go
- checker_mode.go
- config.go
- constructor.go
- do.go
- env.go
- exec.go
- exec_option.go
- option.go
- option_aliases.go
- option_args.go
- option_async.go
- option_break.go
- option_configs.go
- option_contains.go
- option_dir.go
- option_equal.go
- option_fields.go
- option_name.go
- option_retry.go
- plugin.go
- plugin_base.go
- step.go
- step_option.go
Click to show internal directories.
Click to hide internal directories.