monit_client

package
v2.1.4+incompatible Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2022 License: Apache-2.0, Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CHARSET_ENCODING = "ISO-8859-1"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type MonitClient

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

func New

func New(monitConfig config.MonitConfig, logger lager.Logger) *MonitClient

func (*MonitClient) GetLogger

func (m *MonitClient) GetLogger(req *http.Request) lager.Logger

func (*MonitClient) GetStatus

func (m *MonitClient) GetStatus(req *http.Request) (string, error)

func (*MonitClient) StartServiceBootstrap

func (m *MonitClient) StartServiceBootstrap(req *http.Request) (string, error)

func (*MonitClient) StartServiceJoin

func (m *MonitClient) StartServiceJoin(req *http.Request) (string, error)

func (*MonitClient) StartServiceSingleNode

func (m *MonitClient) StartServiceSingleNode(req *http.Request) (string, error)

func (*MonitClient) StopService

func (m *MonitClient) StopService(req *http.Request) (string, error)

type MonitStatus

type MonitStatus struct {
	XMLName  xml.Name     `xml:"monit"`
	Services []ServiceTag `xml:"service"`
}

func ParseXML

func ParseXML(xmlReader io.Reader) (MonitStatus, error)

type ServiceTag

type ServiceTag struct {
	XMLName       xml.Name `xml:"service"`
	Name          string   `xml:"name"`
	Status        int      `xml:"status"`
	Monitor       int      `xml:"monitor"`
	PendingAction int      `xml:"pendingaction"`
}

Jump to

Keyboard shortcuts

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