Documentation
¶
Index ¶
- Constants
- func AddProcessGroup(client *Client, name string) (bool, error)
- func ClearLog(client *Client) (bool, error)
- func ClearProcessLogs(client *Client, name string) (bool, error)
- func GetAPIVersion(client *Client) (string, error)
- func GetIdentification(client *Client) (string, error)
- func GetPID(client *Client) (int, error)
- func GetSupervisorMethod(method string) string
- func GetSupervisorVersion(client *Client) (string, error)
- func GetSystemMethod(method string) string
- func ListMethods(client *Client) ([]string, error)
- func MethodHelp(client *Client, name string) (string, error)
- func MethodSignature(client *Client, name string) ([]string, error)
- func Multicall(client *Client, calls []MulticallParams) (ret []interface{}, err error)
- func ReadLog(client *Client, offset, length int) (string, error)
- func ReadProcessStderrLog(client *Client, name string, offset, length int) (string, error)
- func ReadProcessStdoutLog(client *Client, name string, offset, length int) (string, error)
- func ReloadConfig(client *Client) ([]interface{}, error)
- func RemoveProcessGroup(client *Client, name string) (bool, error)
- func Restart(client *Client) (bool, error)
- func SendProcessStdin(client *Client, name, chars string) (bool, error)
- func SendRemoteCommEvent(client *Client, name, data string) (bool, error)
- func Shutdown(client *Client) (bool, error)
- func SignalProcess(client *Client, name, signal string) (bool, error)
- func StartProcess(client *Client, name string, wait bool) (bool, error)
- func StopProcess(client *Client, name string, wait bool) (bool, error)
- func TailProcessStderrLog(client *Client, name string, offset, length int) ([]interface{}, error)
- func TailProcessStdoutLog(client *Client, name string, offset, length int) ([]interface{}, error)
- type Client
- func (c *Client) AddProcessGroup(name string) (bool, error)
- func (c *Client) CallBool(method string, args ...interface{}) (rst bool, err error)
- func (c *Client) CallInt(method string, args ...interface{}) (rst int, err error)
- func (c *Client) CallString(method string, args ...interface{}) (rst string, err error)
- func (c *Client) CallStringList(method string, args ...interface{}) (rst []string, err error)
- func (c *Client) CallStruct(method string, v interface{}, args ...interface{}) (err error)
- func (c *Client) ClearAllProcessLogs() (ret []ProcessInfoReturn, err error)
- func (c *Client) ClearLog() (bool, error)
- func (c *Client) ClearProcessLogs(name string) (bool, error)
- func (c *Client) GetAPIVersion() (string, error)
- func (c *Client) GetAllProcessInfo() (ret []ProcessInfoReturn, err error)
- func (c *Client) GetConnect() *xmlrpc.Client
- func (c *Client) GetIdentification() (string, error)
- func (c *Client) GetPID() (int, error)
- func (c *Client) GetProcessInfo(name string) (ret *ProcessInfoReturn, err error)
- func (c *Client) GetServer() string
- func (c *Client) GetState() (ret *GetStateReturn, err error)
- func (c *Client) GetSupervisorVersion() (string, error)
- func (c *Client) GetTransport() http.RoundTripper
- func (c *Client) ListMethods() ([]string, error)
- func (c *Client) MethodHelp(name string) (string, error)
- func (c *Client) MethodSignature(name string) ([]string, error)
- func (c *Client) Multicall(calls []MulticallParams) (ret []interface{}, err error)
- func (c *Client) ReadLog(offset, length int) (string, error)
- func (c *Client) ReadProcessStderrLog(name string, offset, length int) (string, error)
- func (c *Client) ReadProcessStdoutLog(name string, offset, length int) (string, error)
- func (c *Client) ReloadConfig() (ret []interface{}, err error)
- func (c *Client) RemoveProcessGroup(name string) (bool, error)
- func (c *Client) Restart() (bool, error)
- func (c *Client) SendProcessStdin(name, chars string) (bool, error)
- func (c *Client) SendRemoteCommEvent(name, data string) (bool, error)
- func (c *Client) SetConnect(connect *xmlrpc.Client)
- func (c *Client) SetServer(server string)
- func (c *Client) SetTransport(transport http.RoundTripper)
- func (c *Client) Shutdown() (bool, error)
- func (c *Client) SignalAllProcesses(signal string) (ret []ProcessInfoReturn, err error)
- func (c *Client) SignalProcess(name, signal string) (bool, error)
- func (c *Client) SignalProcessGroup(name, signal string) (ret []ProcessInfoReturn, err error)
- func (c *Client) StartAllProcesses(wait bool) (ret []ProcessInfoReturn, err error)
- func (c *Client) StartProcess(name string, wait bool) (bool, error)
- func (c *Client) StartProcessGroup(group string, wait bool) (ret []ProcessInfoReturn, err error)
- func (c *Client) StopAllProcesses(wait bool) (ret []ProcessInfoReturn, err error)
- func (c *Client) StopProcess(name string, wait bool) (bool, error)
- func (c *Client) StopProcessGroup(group string, wait bool) (ret []ProcessInfoReturn, err error)
- func (c *Client) TailProcessStderrLog(name string, offset, length int) (ret []interface{}, err error)
- func (c *Client) TailProcessStdoutLog(name string, offset, length int) (ret []interface{}, err error)
- type GetStateReturn
- type LoggingApiInterface
- type MulticallParams
- type MulticallReturnFailure
- type ProcessApiInterface
- type ProcessInfoReturn
- func ClearAllProcessLogs(client *Client) ([]ProcessInfoReturn, error)
- func GetAllProcessInfo(client *Client) ([]ProcessInfoReturn, error)
- func GetProcessInfo(client *Client, name string) (*ProcessInfoReturn, error)
- func SignalAllProcesses(client *Client, signal string) ([]ProcessInfoReturn, error)
- func SignalProcessGroup(client *Client, name, signal string) ([]ProcessInfoReturn, error)
- func StartAllProcesses(client *Client, wait bool) ([]ProcessInfoReturn, error)
- func StartProcessGroup(client *Client, group string, wait bool) ([]ProcessInfoReturn, error)
- func StopAllProcesses(client *Client, wait bool) ([]ProcessInfoReturn, error)
- func StopProcessGroup(client *Client, group string, wait bool) ([]ProcessInfoReturn, error)
- type StatusApiInterface
- type SystemApiInterface
Constants ¶
View Source
const ( MethodReadProcessStdoutLog string = "readProcessStdoutLog" MethodReadProcessStderrLog string = "readProcessStderrLog" MethodTailProcessStdoutLog string = "tailProcessStdoutLog" MethodTailProcessStderrLog string = "tailProcessStderrLog" MethodClearProcessLogs string = "clearProcessLogs" MethodClearAllProcessLogs string = "clearAllProcessLogs" )
View Source
const ( MethodGetProcessInfo string = "getProcessInfo" MethodGetAllProcessInfo string = "getAllProcessInfo" MethodStartProcess string = "startProcess" MethodStartAllProcesses string = "startAllProcesses" MethodStartProcessGroup string = "startProcessGroup" MethodStopProcess string = "stopProcess" MethodStopAllProcesses string = "stopAllProcesses" MethodStopProcessGroup string = "stopProcessGroup" MethodSignalProcess string = "signalProcess" MethodSignalAllProcesses string = "signalAllProcesses" MethodSignalProcessGroup string = "signalProcessGroup" MethodSendProcessStdin string = "sendProcessStdin" MethodSendRemoteCommEvent string = "sendRemoteCommEvent" MethodReloadConfig string = "reloadConfig" MethodAddProcessGroup string = "addProcessGroup" MethodRemoveProcessGroup string = "removeProcessGroup" )
View Source
const ( DefaultSupervisorMethodPrefix string = "supervisor." DefaultSystemMethodPrefix string = "system." )
View Source
const ( MethodGetAPIVersion string = "getAPIVersion" MethodGetSupervisorVersion string = "getSupervisorVersion" MethodGetIdentification string = "getIdentification" MethodGetState string = "getState" MethodGetPID string = "getPID" MethodReadLog string = "readLog" MethodClearLog string = "clearLog" MethodShutdown string = "shutdown" MethodRestart string = "restart" )
View Source
const ( StateCodeShutDown int = -1 // SHUTDOWN: Supervisor is in the process of shutting down. StateCodeRestarting int = 0 // RESTARTING: Supervisor is in the process of restarting. StateCodeRunning int = 1 // RUNNING: Supervisor is working normally. StateCodeFAtal int = 2 // FATAL: Supervisor has experienced a serious error. StateNameShowdown string = "SHUTDOWN" StateNameRestarting string = "RESTARTING" StateNameRunning string = "RUNNING" StateNameFatal string = "FATAL" )
View Source
const ( MethodListMethods string = "listMethods" MethodMethodHelp string = "methodHelp" MethodMethodSignature string = "methodSignature" MethodMulticall string = "multicall" )
Variables ¶
This section is empty.
Functions ¶
func GetAPIVersion ¶
func GetIdentification ¶
func GetSupervisorMethod ¶
func GetSupervisorVersion ¶
func GetSystemMethod ¶
func ListMethods ¶
func Multicall ¶
func Multicall(client *Client, calls []MulticallParams) (ret []interface{}, err error)
func ReadProcessStderrLog ¶
func ReadProcessStdoutLog ¶
func ReloadConfig ¶
func SendRemoteCommEvent ¶
func TailProcessStderrLog ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) CallString ¶
func (*Client) CallStringList ¶
func (*Client) CallStruct ¶
func (*Client) ClearAllProcessLogs ¶
func (c *Client) ClearAllProcessLogs() (ret []ProcessInfoReturn, err error)
func (*Client) GetAPIVersion ¶
func (*Client) GetAllProcessInfo ¶
func (c *Client) GetAllProcessInfo() (ret []ProcessInfoReturn, err error)
func (*Client) GetConnect ¶
func (*Client) GetIdentification ¶
func (*Client) GetProcessInfo ¶
func (c *Client) GetProcessInfo(name string) (ret *ProcessInfoReturn, err error)
func (*Client) GetState ¶
func (c *Client) GetState() (ret *GetStateReturn, err error)
func (*Client) GetSupervisorVersion ¶
func (*Client) GetTransport ¶
func (c *Client) GetTransport() http.RoundTripper
func (*Client) ListMethods ¶
func (*Client) Multicall ¶
func (c *Client) Multicall(calls []MulticallParams) (ret []interface{}, err error)
func (*Client) ReadProcessStderrLog ¶
func (*Client) ReadProcessStdoutLog ¶
func (*Client) ReloadConfig ¶
func (*Client) SendProcessStdin ¶
func (*Client) SendRemoteCommEvent ¶
func (*Client) SetConnect ¶
func (*Client) SetTransport ¶
func (c *Client) SetTransport(transport http.RoundTripper)
func (*Client) SignalAllProcesses ¶
func (c *Client) SignalAllProcesses(signal string) (ret []ProcessInfoReturn, err error)
func (*Client) SignalProcessGroup ¶
func (c *Client) SignalProcessGroup(name, signal string) (ret []ProcessInfoReturn, err error)
func (*Client) StartAllProcesses ¶
func (c *Client) StartAllProcesses(wait bool) (ret []ProcessInfoReturn, err error)
func (*Client) StartProcessGroup ¶
func (c *Client) StartProcessGroup(group string, wait bool) (ret []ProcessInfoReturn, err error)
func (*Client) StopAllProcesses ¶
func (c *Client) StopAllProcesses(wait bool) (ret []ProcessInfoReturn, err error)
func (*Client) StopProcessGroup ¶
func (c *Client) StopProcessGroup(group string, wait bool) (ret []ProcessInfoReturn, err error)
func (*Client) TailProcessStderrLog ¶
type GetStateReturn ¶
type GetStateReturn struct {
StateCode int `xmlrpc:"statecode"`
StateName string `xmlrpc:"statename"`
}
func GetState ¶
func GetState(client *Client) (*GetStateReturn, error)
type LoggingApiInterface ¶
type LoggingApiInterface interface {
ReadProcessStdoutLog(string, int, int) (string, error)
TailProcessStdoutLog(string, int, int) (string, error)
ReadProcessStderrLog(string, int, int) ([]interface{}, error)
TailProcessStderrLog(string, int, int) (string, error)
ClearProcessLogs(string) (bool, error)
ClearAllProcessLogs() ([]ProcessInfoReturn, error)
}
type MulticallParams ¶
type MulticallParams struct {
MethodName string `xmlrpc:"methodName"`
Params []interface{} `xmlrpc:"params"`
}
type MulticallReturnFailure ¶
type MulticallReturnFailure struct {
FaultCode int `xmlrpc:"faultCode"`
FaultString string `xmlrpc:"faultString"`
}
TODO
type ProcessApiInterface ¶
type ProcessApiInterface interface {
GetProcessInfo(string) (ProcessInfoReturn, error)
GetAllProcessInfo() ([]ProcessInfoReturn, error)
StartProcess(string, bool) (bool, error)
StartAllProcesses(bool) ([]ProcessInfoReturn, error)
StartProcessGroup(string, bool) ([]ProcessInfoReturn, error)
StopProcess(string, bool) (bool, error)
StopAllProcesses(bool) ([]ProcessInfoReturn, error)
StopProcessGroup(string, bool) ([]ProcessInfoReturn, error)
SignalProcess(string, string) (bool, error)
SignalProcessGroup(string, string) ([]ProcessInfoReturn, error)
SignalAllProcesses(string) ([]ProcessInfoReturn, error)
SendProcessStdin(string, string) (bool, error)
SendRemoteCommEvent(string, string) (bool, error)
ReloadConfig() ([]interface{}, error)
AddProcessGroup(string) (bool, error)
RemoveProcessGroup(string) (bool, error)
}
type ProcessInfoReturn ¶
type ProcessInfoReturn struct {
Name string `xmlrpc:"name"`
Group string `xmlrpc:"group"`
Description string `xmlrpc:"description"`
Start int `xmlrpc:"start"`
Stop int `xmlrpc:"stop"`
Now int `xmlrpc:"now"`
State int `xmlrpc:"state"`
StateName string `xmlrpc:"statename"`
Status int `xmlrpc:"status"`
SpawnErr string `xmlrpc:"spawnerr"`
ExitStatus int `xmlrpc:"exitstatus"`
LogFile string `xmlrpc:"logfile"`
StdoutLogFile string `xmlrpc:"stdout_logfile"`
StderrLogFile string `xmlrpc:"stderr_logfile"`
Pid int `xmlrpc:"pid"`
}
func ClearAllProcessLogs ¶
func ClearAllProcessLogs(client *Client) ([]ProcessInfoReturn, error)
func GetAllProcessInfo ¶
func GetAllProcessInfo(client *Client) ([]ProcessInfoReturn, error)
func GetProcessInfo ¶
func GetProcessInfo(client *Client, name string) (*ProcessInfoReturn, error)
func SignalAllProcesses ¶
func SignalAllProcesses(client *Client, signal string) ([]ProcessInfoReturn, error)
func SignalProcessGroup ¶
func SignalProcessGroup(client *Client, name, signal string) ([]ProcessInfoReturn, error)
func StartAllProcesses ¶
func StartAllProcesses(client *Client, wait bool) ([]ProcessInfoReturn, error)
func StartProcessGroup ¶
func StartProcessGroup(client *Client, group string, wait bool) ([]ProcessInfoReturn, error)
func StopAllProcesses ¶
func StopAllProcesses(client *Client, wait bool) ([]ProcessInfoReturn, error)
func StopProcessGroup ¶
func StopProcessGroup(client *Client, group string, wait bool) ([]ProcessInfoReturn, error)
type StatusApiInterface ¶
type StatusApiInterface interface {
GetAPIVersion() (string, error)
GetSupervisorVersion() (string, error)
GetIdentification() (string, error)
GetState() (GetStateReturn, error)
GetPID() (int, error)
ReadLog(int, int) (string, error)
ClearLog() (bool, error)
Shutdown() (bool, error)
Restart() (bool, error)
}
Click to show internal directories.
Click to hide internal directories.