healthchecks

package
v0.0.0-...-14aa065 Latest Latest
Warning

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

Go to latest
Published: May 24, 2016 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FakeHealthChecks

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

FakeHealthChecks fakes out health checks.

func NewFakeHealthChecks

func NewFakeHealthChecks() *FakeHealthChecks

NewFakeHealthChecks returns a new FakeHealthChecks.

func (*FakeHealthChecks) CreateHttpHealthCheck

func (f *FakeHealthChecks) CreateHttpHealthCheck(hc *compute.HttpHealthCheck) error

CreateHttpHealthCheck fakes out http health check creation.

func (*FakeHealthChecks) DeleteHttpHealthCheck

func (f *FakeHealthChecks) DeleteHttpHealthCheck(name string) error

DeleteHttpHealthCheck fakes out deleting a http health check.

func (*FakeHealthChecks) GetHttpHealthCheck

func (f *FakeHealthChecks) GetHttpHealthCheck(name string) (*compute.HttpHealthCheck, error)

GetHttpHealthCheck fakes out getting a http health check from the cloud.

type HealthChecker

type HealthChecker interface {
	Add(port int64, path string) error
	Delete(port int64) error
	Get(port int64) (*compute.HttpHealthCheck, error)
}

HealthChecker is an interface to manage cloud HTTPHealthChecks.

func NewHealthChecker

func NewHealthChecker(cloud SingleHealthCheck, defaultHealthCheckPath string, namer utils.Namer) HealthChecker

NewHealthChecker creates a new health checker. cloud: the cloud object implementing SingleHealthCheck. defaultHealthCheckPath: is the HTTP path to use for health checks.

type HealthChecks

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

HealthChecks manages health checks.

func (*HealthChecks) Add

func (h *HealthChecks) Add(port int64, path string) error

Add adds a healthcheck if one for the same port doesn't already exist.

func (*HealthChecks) Delete

func (h *HealthChecks) Delete(port int64) error

Delete deletes the health check by port.

func (*HealthChecks) Get

func (h *HealthChecks) Get(port int64) (*compute.HttpHealthCheck, error)

Get returns the given health check.

type SingleHealthCheck

type SingleHealthCheck interface {
	CreateHttpHealthCheck(hc *compute.HttpHealthCheck) error
	DeleteHttpHealthCheck(name string) error
	GetHttpHealthCheck(name string) (*compute.HttpHealthCheck, error)
}

SingleHealthCheck is an interface to manage a single GCE health check.

Jump to

Keyboard shortcuts

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