healthchecker

package
v3.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: May 1, 2018 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientError

type ClientError struct {
	Err error
}

func (ClientError) Error

func (e ClientError) Error() string

type DeleteRouteError

type DeleteRouteError struct {
	Domain   string
	Hostname string
}

func (DeleteRouteError) Error

func (e DeleteRouteError) Error() string

type HealthCheckError

type HealthCheckError struct {
	StatusCode int
	Endpoint   string
	Body       []byte
}

func (HealthCheckError) Error

func (e HealthCheckError) Error() string

type HealthChecker

type HealthChecker struct {
	// OldURL is the prepend on the foundationURL to replace in order to build the
	// newly pushed application URL.
	// Eg: "api.run.pivotal"
	OldURL string

	// NewUrl is what replaces OldURL in the OnEvent function.
	// Eg: "cfapps"
	NewURL string

	//SilentDeployURL represents any other url that doesn't match cfapps
	SilentDeployURL         string
	SilentDeployEnvironment string

	Client  I.Client
	Courier I.Courier
	Log     I.Logger
}

HealthChecker will check an endpoint for a http.StatusOK

func (HealthChecker) Check

func (h HealthChecker) Check(url, endpoint string) error

Check takes a url and endpoint. It does an http.Get to get the response status and returns an error if it is not http.StatusOK.

func (HealthChecker) PushFinishedEventHandler

func (h HealthChecker) PushFinishedEventHandler(event push.PushFinishedEvent) error

type LoginError

type LoginError struct {
	FoundationURL string
}

func (LoginError) Error

func (e LoginError) Error() string

type MapRouteError

type MapRouteError struct {
	AppName string
	Domain  string
}

func (MapRouteError) Error

func (e MapRouteError) Error() string

type WrongEventTypeError

type WrongEventTypeError struct {
	Type string
}

func (WrongEventTypeError) Error

func (e WrongEventTypeError) Error() string

Jump to

Keyboard shortcuts

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