Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CmdDaemon ¶
type CmdDaemon struct {
Name string // app cli command name
SocketPath string // unix socket path
// contains filtered or unexported fields
}
func (*CmdDaemon) Listen ¶
Listen 启动守护进程并监听Unix socket上的连接 参数:
c: CmdDaemon 实例指针
返回:
error: 监听过程中发生的错误(如果有)
func (*CmdDaemon) RegisterCmd ¶
func (c *CmdDaemon) RegisterCmd(cmd string, handler CmdHandler)
type CmdHandler ¶
type CmdHandler interface {
Handle(conn *CmdConn, req *CmdRequest) error
Description() string
Usage() string
}
type CmdRequest ¶
Click to show internal directories.
Click to hide internal directories.