Documentation
¶
Index ¶
- type AllProcessInfoReply
- type ShutdownReply
- type StartStopReply
- type VersionReply
- type XMLLeafProcessor
- type XMLNonLeafProcessor
- type XMLPath
- type XMLProcessorManager
- func (xpm *XMLProcessorManager) AddLeafProcessor(path string, processor XMLLeafProcessor)
- func (xpm *XMLProcessorManager) AddNonLeafProcessor(path string, processor XMLNonLeafProcessor)
- func (xpm *XMLProcessorManager) ProcessLeafNode(path string, data string)
- func (xpm *XMLProcessorManager) ProcessNonLeafNode(path string)
- func (xpm *XMLProcessorManager) ProcessXML(reader io.Reader)
- type XMLRPCClient
- func (r *XMLRPCClient) ChangeAllProcessState(change string) (reply AllProcessInfoReply, err error)
- func (r *XMLRPCClient) ChangeProcessState(change string, processName string) (reply StartStopReply, err error)
- func (r *XMLRPCClient) GetAllProcessInfo() (reply AllProcessInfoReply, err error)
- func (r *XMLRPCClient) GetProcessInfo(process string) (reply types.ProcessInfo, err error)
- func (r *XMLRPCClient) GetVersion() (reply VersionReply, err error)
- func (r *XMLRPCClient) ReloadConfig() (reply types.ReloadConfigResult, err error)
- func (r *XMLRPCClient) SetPassword(password string)
- func (r *XMLRPCClient) SetTimeout(timeout time.Duration)
- func (r *XMLRPCClient) SetUser(user string)
- func (r *XMLRPCClient) Shutdown() (reply ShutdownReply, err error)
- func (r *XMLRPCClient) SignalAll(signal string) (reply AllProcessInfoReply, err error)
- func (r *XMLRPCClient) SignalProcess(signal string, name string) (reply types.BooleanReply, err error)
- func (r *XMLRPCClient) URL() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AllProcessInfoReply ¶
type AllProcessInfoReply struct {
Value []types.ProcessInfo
}
AllProcessInfoReply all the processes information from supervisor
type ShutdownReply ¶
type ShutdownReply StartStopReply
ShutdownReply the program shutdown reply message
type StartStopReply ¶
type StartStopReply struct {
Value bool
}
StartStopReply the program start/stop reply message from supervisor
type VersionReply ¶
type VersionReply struct {
Value string
}
VersionReply the version reply message from supervisor
type XMLLeafProcessor ¶
type XMLLeafProcessor func(value string)
XMLLeafProcessor the XML leaf element process function
type XMLNonLeafProcessor ¶
type XMLNonLeafProcessor func()
XMLNonLeafProcessor the non-leaf element process function
type XMLPath ¶
type XMLPath struct {
ElemNames []string
}
XMLPath represent the XML path in array
func (*XMLPath) AddChildren ¶
AddChildren append paths to the XMLPath
func (*XMLPath) RemoveLast ¶
func (xp *XMLPath) RemoveLast()
RemoveLast remove the last element from path
type XMLProcessorManager ¶
type XMLProcessorManager struct {
// contains filtered or unexported fields
}
XMLProcessorManager the xml processor based on the XMLPath
func NewXMLProcessorManager ¶
func NewXMLProcessorManager() *XMLProcessorManager
NewXMLProcessorManager create a new XMLProcessorManager object
func (*XMLProcessorManager) AddLeafProcessor ¶
func (xpm *XMLProcessorManager) AddLeafProcessor(path string, processor XMLLeafProcessor)
AddLeafProcessor add a leaf processor for the xml path
func (*XMLProcessorManager) AddNonLeafProcessor ¶
func (xpm *XMLProcessorManager) AddNonLeafProcessor(path string, processor XMLNonLeafProcessor)
AddNonLeafProcessor add a non-leaf processor for the xml path
func (*XMLProcessorManager) ProcessLeafNode ¶
func (xpm *XMLProcessorManager) ProcessLeafNode(path string, data string)
ProcessLeafNode process the leaf element with xml path and its value
func (*XMLProcessorManager) ProcessNonLeafNode ¶
func (xpm *XMLProcessorManager) ProcessNonLeafNode(path string)
ProcessNonLeafNode process the non-leaf element based on the xml path
func (*XMLProcessorManager) ProcessXML ¶
func (xpm *XMLProcessorManager) ProcessXML(reader io.Reader)
ProcessXML read the xml from reader and process it
type XMLRPCClient ¶
type XMLRPCClient struct {
// contains filtered or unexported fields
}
XMLRPCClient the supervisor XML RPC client library
func NewXMLRPCClient ¶
func NewXMLRPCClient(serverurl string, verbose bool) *XMLRPCClient
NewXMLRPCClient create a XMLRPCClient object
func (*XMLRPCClient) ChangeAllProcessState ¶
func (r *XMLRPCClient) ChangeAllProcessState(change string) (reply AllProcessInfoReply, err error)
ChangeAllProcessState change all the program to same state( start/stop )
func (*XMLRPCClient) ChangeProcessState ¶
func (r *XMLRPCClient) ChangeProcessState(change string, processName string) (reply StartStopReply, err error)
ChangeProcessState change the process state
func (*XMLRPCClient) GetAllProcessInfo ¶
func (r *XMLRPCClient) GetAllProcessInfo() (reply AllProcessInfoReply, err error)
GetAllProcessInfo get all the processes of supervisor
func (*XMLRPCClient) GetProcessInfo ¶
func (r *XMLRPCClient) GetProcessInfo(process string) (reply types.ProcessInfo, err error)
GetProcessInfo get the process information of one program
func (*XMLRPCClient) GetVersion ¶
func (r *XMLRPCClient) GetVersion() (reply VersionReply, err error)
GetVersion send get the supervisor http version request
func (*XMLRPCClient) ReloadConfig ¶
func (r *XMLRPCClient) ReloadConfig() (reply types.ReloadConfigResult, err error)
ReloadConfig ask supervisor reload the configuration
func (*XMLRPCClient) SetPassword ¶
func (r *XMLRPCClient) SetPassword(password string)
SetPassword set the password for basic http auth
func (*XMLRPCClient) SetTimeout ¶
func (r *XMLRPCClient) SetTimeout(timeout time.Duration)
SetTimeout set the http request timeout
func (*XMLRPCClient) SetUser ¶
func (r *XMLRPCClient) SetUser(user string)
SetUser set the user for basic http auth
func (*XMLRPCClient) Shutdown ¶
func (r *XMLRPCClient) Shutdown() (reply ShutdownReply, err error)
Shutdown shutdown the supervisor
func (*XMLRPCClient) SignalAll ¶
func (r *XMLRPCClient) SignalAll(signal string) (reply AllProcessInfoReply, err error)
SignalAll send signal to all the programs
func (*XMLRPCClient) SignalProcess ¶
func (r *XMLRPCClient) SignalProcess(signal string, name string) (reply types.BooleanReply, err error)
SignalProcess send signal to program