Documentation ¶
Index ¶
- func Aliases(aliases ...*alias) *optionAliases
- func Args(args ...interface{}) *optionArgs
- func Async() *optionAsync
- func Bootstrap(constructor constructor, opts ...option) (err error)
- func Break() *optionBreak
- func Contains(contains string) *optionContains
- func Continue() *optionBreak
- func Dir(dir string) *optionDir
- func Env(key string, value string) *optionEnvironment
- func Environment(key string, value string) *optionEnvironment
- 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 String(output *string) *optionString
- func StringEnv(env string) *optionStringEnvironments
- func StringEnvironment(environment string) *optionStringEnvironments
- func StringEnvironments(environments ...string) *optionStringEnvironments
- func StringEnvs(envs ...string) *optionStringEnvironments
- 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 ¶
func Environment ¶ added in v0.3.3
Environment 环境变量
func StringEnv ¶ added in v0.3.2
func StringEnv(env string) *optionStringEnvironments
StringEnv 环境变量
func StringEnvironment ¶ added in v0.3.3
func StringEnvironment(environment string) *optionStringEnvironments
StringEnvironment 环境变量
func StringEnvironments ¶ added in v0.3.3
func StringEnvironments(environments ...string) *optionStringEnvironments
StringEnvironments 环境变量列表
func StringEnvs ¶ added in v0.3.2
func StringEnvs(envs ...string) *optionStringEnvironments
StringEnvs 环境变量列表
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 配置
type Step ¶ added in v0.0.2
type Step struct {
// contains filtered or unexported fields
}
Step 步骤
func NewDefaultDelayStep ¶ added in v0.2.5
func NewDefaultDelayStep() *Step
NewDefaultDelayStep 创建延迟步骤,调试使用
func NewDelayStep ¶ added in v0.2.5
NewDelayStep 创建延迟步骤,调试使用
Source Files ¶
- alias.go
- base.go
- bootstrap.go
- checker.go
- checker_mode.go
- collector.go
- collector_mode.go
- config.go
- const.go
- constructor.go
- do.go
- env.go
- exception.go
- exec.go
- exec_option.go
- option.go
- option_aliases.go
- option_args.go
- option_async.go
- option_break.go
- option_contains.go
- option_dir.go
- option_environment.go
- option_environments_string.go
- option_equal.go
- option_fields.go
- option_name.go
- option_retry.go
- option_string.go
- plugin.go
- step.go
- step_option.go
- to_slice.go
Click to show internal directories.
Click to hide internal directories.