xmlrpcclient

package module
v0.0.0-...-7111dfa Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

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 NewXMLPath

func NewXMLPath() *XMLPath

NewXMLPath create a new XMLPath object

func (*XMLPath) AddChild

func (xp *XMLPath) AddChild(elemName string)

AddChild add a child to the path

func (*XMLPath) AddChildren

func (xp *XMLPath) AddChildren(names ...string)

AddChildren append paths to the XMLPath

func (*XMLPath) Equals

func (xp *XMLPath) Equals(other *XMLPath) bool

Equals check if this XMLPath object equals other XMLPath object

func (*XMLPath) RemoveLast

func (xp *XMLPath) RemoveLast()

RemoveLast remove the last element from path

func (*XMLPath) String

func (xp *XMLPath) String() string

String convert the XMLPath to string

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

func (*XMLRPCClient) URL

func (r *XMLRPCClient) URL() string

URL return the RPC url

Jump to

Keyboard shortcuts

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