monit

package
v0.0.30 Latest Latest
Warning

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

Go to latest
Published: May 12, 2017 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StatusUnknown  = "unknown"
	StatusStarting = "starting"
	StatusRunning  = "running"
	StatusFailing  = "failing"
)

Variables

This section is empty.

Functions

func NewMonitRetryClient

func NewMonitRetryClient(
	delegate boshhttp.Client,
	maxUnavailableAttempts uint,
	maxOtherAttempts uint,
	retryDelay time.Duration,
	logger boshlog.Logger,
) boshhttp.Client

func NewMonitRetryStrategy

func NewMonitRetryStrategy(
	retryable boshhttp.RequestRetryable,
	maxUnavailableAttempts uint,
	maxOtherAttempts uint,
	delay time.Duration,
	timeService clock.Clock,
) boshretry.RetryStrategy

Types

type Client

type Client interface {
	ServicesInGroup(name string) (services []string, err error)
	StartService(name string) (err error)
	StopService(name string) (err error)
	UnmonitorService(name string) (err error)
	Status() (status Status, err error)
}

func NewHTTPClient

func NewHTTPClient(
	host, username, password string,
	shortClient boshhttp.Client,
	longClient boshhttp.Client,
	logger boshlog.Logger,
) Client

NewHTTPClient creates a new monit client

status & start use the shortClient unmonitor & stop use the longClient

type ClientProvider

type ClientProvider interface {
	Get() (Client, error)
}

func NewProvider

func NewProvider(platform boshplatform.Platform, logger boshlog.Logger) ClientProvider

type Service

type Service struct {
	Name                 string
	Monitored            bool
	Errored              bool
	Pending              bool
	Status               string
	StatusMessage        string
	Uptime               int
	MemoryPercentTotal   float64
	MemoryKilobytesTotal int
	CPUPercentTotal      float64
}

type Status

type Status interface {
	GetIncarnation() (int, error)
	ServicesInGroup(name string) (services []Service)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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