Documentation
¶
Index ¶
- func Async() *optionAsync
- func Bootstrap(constructor constructor, opts ...option) (err error)
- func Configs(configs ...string) *optionConfigs
- func Continue() *optionInterrupt
- func Interrupt() *optionInterrupt
- func Name(name string) *optionName
- func NewOptions(options ...option) []option
- func Sync() *optionAsync
- type Config
- type Configuration
- type Plugin
- type Step
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
// 是否启用默认配置
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}}"`
}
Config 插件基础配置
type Configuration ¶ added in v0.0.2
type Configuration interface {
// Setup 设置配置信息
Setup() (unset bool, err error)
// Fields 导出所有字段
Fields() gox.Fields
// Basic 基础配置
Basic() *Config
}
Configuration 配置
type Plugin ¶ added in v0.0.2
type Plugin interface {
// Configuration 加载配置
Configuration() (configuration Configuration)
// Steps 插件运行步骤
Steps() []*Step
}
Plugin 插件
Click to show internal directories.
Click to hide internal directories.