rpcclient

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: May 13, 2022 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RPCPath = "/RPC2"
)
View Source
const (
	ReConnSleepTime = 2 * time.Second
)

Variables

View Source
var (
	ErrCallCanceled = errors.New("ctx canceled")
)

Functions

This section is empty.

Types

type AllProcessInfoReply

type AllProcessInfoReply struct {
	AllProcessInfo []types.ProcessInfo
}

type ChangeAllProcessStateArg

type ChangeAllProcessStateArg struct {
	Wait bool
}

type ChangeAllProcessStateRet

type ChangeAllProcessStateRet AllProcessInfoReply

type ChangeProcessStateArg

type ChangeProcessStateArg struct {
	Name string
}

type ChangeProcessStateRet

type ChangeProcessStateRet struct {
	Success bool
}

type Client

type Client interface {
	Close() error
	SetAuth(username, passwd string)
	Call(ctx context.Context, serviceMethod string, args interface{}, reply interface{}) error
}

func NewClient

func NewClient(address string) Client

func NewHTTPClient

func NewHTTPClient(address string) Client

func NewTlsClient

func NewTlsClient(protocol, address string, config *tls.Config) Client

protocol support http and tcp

type GetAllProcessInfoArg

type GetAllProcessInfoArg struct {
}

type GetAllProcessInfoRet

type GetAllProcessInfoRet AllProcessInfoReply

type GetEnvArg added in v1.0.4

type GetEnvArg struct {
	Key string
}

type GetEnvRet added in v1.0.4

type GetEnvRet struct {
	Value string
}

type GetProcessInfoArg

type GetProcessInfoArg struct {
	Name string
}

type GetProcessInfoRet

type GetProcessInfoRet ProcessInfoReply

type GetVersionArg

type GetVersionArg struct {
}

type GetVersionRet

type GetVersionRet struct {
	Version string
}

type ProcessInfoReply

type ProcessInfoReply struct {
	ProcessInfo *types.ProcessInfo
}

type RPCClient

type RPCClient struct {
	// contains filtered or unexported fields
}

func NewRPCClient

func NewRPCClient(serverurl, user, passwd string, verbose bool) *RPCClient

func (*RPCClient) ChangeAllProcessState

func (r *RPCClient) ChangeAllProcessState(change string) (*ChangeAllProcessStateRet, error)

func (*RPCClient) ChangeProcessState

func (r *RPCClient) ChangeProcessState(change string, processName string) (*ChangeProcessStateRet, error)

func (*RPCClient) GetAllProcessInfo

func (r *RPCClient) GetAllProcessInfo() (*GetAllProcessInfoRet, error)

func (*RPCClient) GetEnv added in v1.0.4

func (r *RPCClient) GetEnv(in *GetEnvArg) (*GetEnvRet, error)

func (*RPCClient) GetProcessInfo

func (r *RPCClient) GetProcessInfo(in *GetProcessInfoArg) (*GetProcessInfoRet, error)

func (*RPCClient) GetVersion

func (r *RPCClient) GetVersion() (*GetVersionRet, error)

func (*RPCClient) ReloadConfig

func (r *RPCClient) ReloadConfig() (*ReloadConfigRet, error)

func (*RPCClient) SetEnv added in v1.0.4

func (r *RPCClient) SetEnv(in *SetEnvArg) (*SetEnvRet, error)

func (*RPCClient) Shutdown

func (r *RPCClient) Shutdown() (*ShutdownRet, error)

func (*RPCClient) SignalAllProcesses

func (r *RPCClient) SignalAllProcesses(in *SignalAllProcessesArg) (*SignalAllProcessesRet, error)

func (*RPCClient) SignalProcess

func (r *RPCClient) SignalProcess(in *SignalProcessArg) (*SignalProcessRet, error)

func (*RPCClient) Url

func (r *RPCClient) Url() string

type ReloadConfigArg

type ReloadConfigArg struct {
}

type ReloadConfigRet

type ReloadConfigRet types.ReloadConfigResult

type SetEnvArg added in v1.0.4

type SetEnvArg struct {
	Key   string
	Value string
}

type SetEnvRet added in v1.0.4

type SetEnvRet struct {
}

type ShutdownArg

type ShutdownArg struct {
}

type ShutdownRet

type ShutdownRet struct {
	Success bool
}

type SignalAllProcessesArg

type SignalAllProcessesArg struct {
	Signal string
}

type SignalAllProcessesRet

type SignalAllProcessesRet AllProcessInfoReply

type SignalProcessArg

type SignalProcessArg struct {
	ProcName string
	Signal   string
}

type SignalProcessRet

type SignalProcessRet types.BooleanReply

type StatusReply

type StatusReply struct {
	Success bool
}

Jump to

Keyboard shortcuts

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