aerpc

package
v0.4.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 24, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

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 NormalizeAddr(flagValue string) (addr string)

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) Execute

func (c *RpcCommandCheck) Execute(client *rpc.Client) (err error)

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) Execute

func (c *RpcCommandPing) Execute(client *rpc.Client) (err error)

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

type RpcCommandStatus stats.StatsInfo

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL