monit

package
v0.0.0-...-3fc8308 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2015 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHTTPClient

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

NewHTTPClient creates a new monit client

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

func NewMonitRetryHandler

func NewMonitRetryHandler(maxUnavailableAttempts, maxOtherAttempts uint) boshhttp.RetryHandler

func NewMonitRetryStrategy

func NewMonitRetryStrategy(maxUnavailableAttempts, maxOtherAttempts uint) boshhttp.RetryStrategy

func NewProvider

func NewProvider(platform boshplatform.Platform, logger boshlog.Logger, timeService boshtime.Service) clientProvider

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)
}

type Service

type Service struct {
	Monitored bool
	Status    string
}

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