Documentation ¶
Index ¶
- Constants
- Variables
- func NormalizeAddr(flagValue string) (addr string)
- func RegisterCommands()
- type RpcCommand
- type RpcCommandBackup
- func (c *RpcCommandBackup) Data() interface{}
- func (c *RpcCommandBackup) Execute(client *rpc.Client) (err error)
- func (c *RpcCommandBackup) Help() string
- func (c *RpcCommandBackup) Print()
- func (c *RpcCommandBackup) RpcName() string
- func (c *RpcCommandBackup) SetArgs(args []string) (err error)
- func (c *RpcCommandBackup) ShortName() string
- type RpcCommandCheck
- func (c *RpcCommandCheck) Data() interface{}
- func (c *RpcCommandCheck) Execute(client *rpc.Client) (err error)
- func (c *RpcCommandCheck) Help() string
- func (c *RpcCommandCheck) Print()
- func (c *RpcCommandCheck) RpcName() string
- func (c *RpcCommandCheck) SetArgs(args []string) (err error)
- func (c *RpcCommandCheck) ShortName() string
- type RpcCommandFileList
- func (c *RpcCommandFileList) Data() interface{}
- func (c *RpcCommandFileList) Execute(client *rpc.Client) (err error)
- func (c *RpcCommandFileList) Help() string
- func (c *RpcCommandFileList) Print()
- func (c *RpcCommandFileList) RpcName() string
- func (c *RpcCommandFileList) SetArgs(args []string) (err error)
- func (c *RpcCommandFileList) ShortName() string
- type RpcCommandPing
- func (c *RpcCommandPing) Data() interface{}
- func (c *RpcCommandPing) Execute(client *rpc.Client) (err error)
- func (c *RpcCommandPing) Help() string
- func (c *RpcCommandPing) Print()
- func (c *RpcCommandPing) RpcName() string
- func (c *RpcCommandPing) SetArgs(args []string) (err error)
- func (c *RpcCommandPing) ShortName() string
- type RpcCommandStatus
- func (c *RpcCommandStatus) Data() interface{}
- func (c *RpcCommandStatus) Execute(client *rpc.Client) (err error)
- func (c *RpcCommandStatus) Help() string
- func (c *RpcCommandStatus) Print()
- func (c *RpcCommandStatus) RpcName() string
- func (c *RpcCommandStatus) SetArgs(args []string) (err error)
- func (c *RpcCommandStatus) ShortName() string
- type RpcCommandVersion
- func (c *RpcCommandVersion) Data() interface{}
- func (c *RpcCommandVersion) Execute(client *rpc.Client) (err error)
- func (c *RpcCommandVersion) Help() string
- func (c *RpcCommandVersion) Print()
- func (c *RpcCommandVersion) RpcName() string
- func (c *RpcCommandVersion) SetArgs(args []string) (err error)
- func (c *RpcCommandVersion) ShortName() string
Constants ¶
View Source
const ( DEFAULT_HOST = "127.0.0.1" DEFAULT_PORT = "32032" SERVER_FLAG_FORMAT = ` Server addr format: default addr: ` + DEFAULT_HOST + `:` + DEFAULT_PORT + ` examples: -s=192.168.1.2 will be 192.168.1.2:` + DEFAULT_PORT + ` -s=:32033 will be ` + DEFAULT_HOST + `:32033 -s=anteater.local:3234 will be anteater.local:3234 ` )
Variables ¶
View Source
var Commands = make(map[string]RpcCommand)
All rpc commands as map[cmd_name] cmd
Functions ¶
func NormalizeAddr ¶
func RegisterCommands ¶
func RegisterCommands()
Types ¶
type RpcCommand ¶
type RpcCommand interface { ShortName() string RpcName() string Help() string SetArgs(args []string) (err error) Execute(client *rpc.Client) (err error) Print() Data() interface{} }
Interface
type RpcCommandBackup ¶
type RpcCommandBackup struct {
// contains filtered or unexported fields
}
BACKUP
func (*RpcCommandBackup) Data ¶
func (c *RpcCommandBackup) Data() interface{}
func (*RpcCommandBackup) Execute ¶
func (c *RpcCommandBackup) Execute(client *rpc.Client) (err error)
func (*RpcCommandBackup) Help ¶
func (c *RpcCommandBackup) Help() string
func (*RpcCommandBackup) Print ¶
func (c *RpcCommandBackup) Print()
func (*RpcCommandBackup) RpcName ¶
func (c *RpcCommandBackup) RpcName() string
func (*RpcCommandBackup) SetArgs ¶
func (c *RpcCommandBackup) SetArgs(args []string) (err error)
func (*RpcCommandBackup) ShortName ¶
func (c *RpcCommandBackup) ShortName() string
type RpcCommandCheck ¶
type RpcCommandCheck string
CHECK
func (*RpcCommandCheck) Data ¶
func (c *RpcCommandCheck) Data() interface{}
func (*RpcCommandCheck) Help ¶
func (c *RpcCommandCheck) Help() string
func (*RpcCommandCheck) Print ¶
func (c *RpcCommandCheck) Print()
func (*RpcCommandCheck) RpcName ¶
func (c *RpcCommandCheck) RpcName() string
func (*RpcCommandCheck) SetArgs ¶
func (c *RpcCommandCheck) SetArgs(args []string) (err error)
func (*RpcCommandCheck) ShortName ¶
func (c *RpcCommandCheck) ShortName() string
type RpcCommandFileList ¶
type RpcCommandFileList struct {
// contains filtered or unexported fields
}
FILELIST
func (*RpcCommandFileList) Data ¶
func (c *RpcCommandFileList) Data() interface{}
func (*RpcCommandFileList) Execute ¶
func (c *RpcCommandFileList) Execute(client *rpc.Client) (err error)
func (*RpcCommandFileList) Help ¶
func (c *RpcCommandFileList) Help() string
func (*RpcCommandFileList) Print ¶
func (c *RpcCommandFileList) Print()
func (*RpcCommandFileList) RpcName ¶
func (c *RpcCommandFileList) RpcName() string
func (*RpcCommandFileList) SetArgs ¶
func (c *RpcCommandFileList) SetArgs(args []string) (err error)
func (*RpcCommandFileList) ShortName ¶
func (c *RpcCommandFileList) ShortName() string
type RpcCommandPing ¶
type RpcCommandPing string
PING
func (*RpcCommandPing) Data ¶
func (c *RpcCommandPing) Data() interface{}
func (*RpcCommandPing) Help ¶
func (c *RpcCommandPing) Help() string
func (*RpcCommandPing) Print ¶
func (c *RpcCommandPing) Print()
func (*RpcCommandPing) RpcName ¶
func (c *RpcCommandPing) RpcName() string
func (*RpcCommandPing) SetArgs ¶
func (c *RpcCommandPing) SetArgs(args []string) (err error)
func (*RpcCommandPing) ShortName ¶
func (c *RpcCommandPing) ShortName() string
type RpcCommandStatus ¶
STATUS
func (*RpcCommandStatus) Data ¶
func (c *RpcCommandStatus) Data() interface{}
func (*RpcCommandStatus) Execute ¶
func (c *RpcCommandStatus) Execute(client *rpc.Client) (err error)
func (*RpcCommandStatus) Help ¶
func (c *RpcCommandStatus) Help() string
func (*RpcCommandStatus) Print ¶
func (c *RpcCommandStatus) Print()
func (*RpcCommandStatus) RpcName ¶
func (c *RpcCommandStatus) RpcName() string
func (*RpcCommandStatus) SetArgs ¶
func (c *RpcCommandStatus) SetArgs(args []string) (err error)
func (*RpcCommandStatus) ShortName ¶
func (c *RpcCommandStatus) ShortName() string
type RpcCommandVersion ¶
type RpcCommandVersion string
VERSION
func (*RpcCommandVersion) Data ¶
func (c *RpcCommandVersion) Data() interface{}
func (*RpcCommandVersion) Execute ¶
func (c *RpcCommandVersion) Execute(client *rpc.Client) (err error)
func (*RpcCommandVersion) Help ¶
func (c *RpcCommandVersion) Help() string
func (*RpcCommandVersion) Print ¶
func (c *RpcCommandVersion) Print()
func (*RpcCommandVersion) RpcName ¶
func (c *RpcCommandVersion) RpcName() string
func (*RpcCommandVersion) SetArgs ¶
func (c *RpcCommandVersion) SetArgs(args []string) (err error)
func (*RpcCommandVersion) ShortName ¶
func (c *RpcCommandVersion) ShortName() string
Click to show internal directories.
Click to hide internal directories.