supervisord

package module
v0.0.0-...-22397b3 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2014 License: MIT Imports: 9 Imported by: 1

README

A Supervisord API client in Go

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ProcessInfo

type ProcessInfo struct {
	Name          string `xmlrpc:"name"`
	Group         string `xmlrpc:"group"`
	Start         int64  `xmlrpc:"start"`
	Stop          int64  `xmlrpc:"stop"`
	Now           int64  `xmlrpc:"now"`
	State         int64  `xmlrpc:"state"`
	Statename     string `xmlrpc:"statename"`
	StdoutLogfile string `xmlrpc:"stdout_logfile"`
	StderrLogfile string `xmlrpc:"stderr_logfile"`
	SpawnErr      string `xmlrpc:"spawnerr"`
	ExitStatus    int64  `xmlrpc:"exitstatus"`
	Pid           int64  `xmlrpc:"pid"`
}

type State

type State struct {
	Statecode int64  `xmlrpc:"statecode"`
	Statename string `xmlrpc:"statename"`
}

type Supervisor

type Supervisor interface {
	GetAPIVersion() (string, error)
	GetSupervisorVersion() (string, error)
	GetIdentification() (string, error)
	GetState() (State, error)
	GetPID() (int, error)
	ReadLog(offset, length int) (string, error)
	ClearLog() (bool, error)
	Shutdown() (bool, error)
	Restart() (bool, error)
	ReloadConfig() ([]string, []string, []string, error)

	GetProcessInfo(string) (ProcessInfo, error)
	GetAllProcessInfo() ([]ProcessInfo, error)
	StartProcess(string, bool) (bool, error)
	StartAllProcesses(bool) ([]ProcessInfo, error)
	StartProcessGroup(string, bool) ([]ProcessInfo, error)
	StopProcess(string, bool) (bool, error)
	StopAllProcesses(bool) ([]ProcessInfo, error)
	StopProcessGroup(string, bool) ([]ProcessInfo, error)
	SendProcessStdin(string, string) (bool, error)
	SendRemoteCommEvent(string, string) (bool, error)
	AddProcessGroup(string) (bool, error)
	RemoveProcessGroup(string) (bool, error)

	ReadProcessStdoutLog(string, int64, int64) (string, error)
	ReadProcessStderrLog(string, int64, int64) (string, error)
	TailProcessStdoutLog(string, int64, int64) (string, int64, bool, error)
	TailProcessStderrLog(string, int64, int64) (string, int64, bool, error)
	ClearProcessLogs(string) (bool, error)
	ClearAllProcessLogs() (bool, error)

	// misc
	Close() error
}

func New

func New(url string, transport *http.Transport) Supervisor

New returns a Supervisor interface type connected to the net.URL specified in u

Optionally specify a http.Transport to use, will use default http.Transport if nil. This will also register a

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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