Documentation ¶
Index ¶
- Variables
- func Exit()
- func Inject(instance interface{})
- func IsCommand(o interface{}) bool
- func Load()
- func Run(label string, options ...string)
- func SetSysExitChannel(c chan bool)
- func StartCron()
- func StartResident()
- func StopCron()
- type CommandArgvs
- type CommandDesc
- type CommandHelpDoc
- type CommandInterface
- type CommandState
- type MethodDesc
- type Option
- type OptionDesc
Constants ¶
This section is empty.
Variables ¶
View Source
var CommandContainer = &container{ Instances: make(map[string]interface{}), Labels: []string{}, }
Functions ¶
func SetSysExitChannel ¶ added in v0.0.17
func SetSysExitChannel(c chan bool)
SetSysExitChannel 设置系统退出信号通道
func StartResident ¶ added in v0.0.25
func StartResident()
Types ¶
type CommandArgvs ¶ added in v0.0.15
type CommandArgvs struct { Command CommandInterface Method reflect.Value Options []*Option Name string }
CommandArgvs command命令行输入内容
type CommandDesc ¶ added in v0.0.5
CommandDesc command描述
type CommandHelpDoc ¶ added in v0.0.15
type CommandHelpDoc struct { AutoExit bool CommandDesc CommandDesc MethodDesc []MethodDesc OptionDesc []OptionDesc }
CommandHelpDoc command帮助文档
type CommandInterface ¶
type CommandInterface interface {
Help() *CommandHelpDoc
}
CommandInterface command父接口
type CommandState ¶ added in v0.0.17
type CommandState struct { Enable bool Cron *cron.Cron ExitChannel chan bool AppExitChannel chan bool Running map[string]string // 进行中任务 Lock *sync.Mutex // map 并发控制 }
CommandState command状态
type MethodDesc ¶ added in v0.0.9
MethodDesc command方法描述
type OptionDesc ¶ added in v0.0.15
OptionDesc command方法参数描述
Click to show internal directories.
Click to hide internal directories.