status

package
v1.15.0 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2023 License: Apache-2.0 Imports: 3 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HealthStateStatusCode

func HealthStateStatusCode(state health.HealthState_Value) int

HealthStateStatusCode returns the http status code for the provided health.HealthState_Value or http.StatusInternalServerError if the health state value is not recognized.

func HealthStatusCode

func HealthStatusCode(metadata health.HealthStatus) int

Types

type HealthCheckSource

type HealthCheckSource interface {
	HealthStatus(ctx context.Context) health.HealthStatus
}

HealthCheckSource provides the SLS health status that should be sent as a response. Refer to the SLS specification for more information.

func NewCombinedHealthCheckSource

func NewCombinedHealthCheckSource(healthCheckSources ...HealthCheckSource) HealthCheckSource

type Source

type Source interface {
	Status() (respStatus int, metadata interface{})
}

Source provides status that should be sent as a response.

Jump to

Keyboard shortcuts

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