healthz

package
v0.0.0-...-17b5b8b Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2018 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// AWSRegion is required even though the IAM API is global.
	AWSRegion string = "eu-central-1"

	// Description describes which functionality this health check implements.
	Description = "Ensure AWS API availability."
	// Name is the identifier of the health check. This can be used for emitting
	// metrics.
	Name = "aws"
	// SuccessMessage is the message returned in case the health check did not
	// fail.
	SuccessMessage = "all good"
	// Timeout is the time being waited until timing out health check, which
	// renders its result unsuccessful.
	Timeout = 5 * time.Second
)

Variables

This section is empty.

Functions

func IsInvalidConfig

func IsInvalidConfig(err error) bool

IsInvalidConfig asserts invalidConfigError.

Types

type Config

type Config struct {
	Logger micrologger.Logger

	AwsConfig awsutil.Config
}

Config represents the configuration used to create a healthz service.

type Service

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

Service implements the healthz service interface.

func New

func New(config Config) (*Service, error)

New creates a new configured healthz service.

func (*Service) GetHealthz

func (s *Service) GetHealthz(ctx context.Context) (healthzservice.Response, error)

GetHealthz implements the health check for AWS. It does this by calling the IAM API to get the current user. This checks that we can connect to the API and the credentials are correct.

Jump to

Keyboard shortcuts

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