middleware

package
v0.0.0-...-15ec0e9 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// DefaultK8sHealthzConfig is the default K8sHealthz middleware config.
	DefaultK8sHealthzConfig = K8sHealthzConfig{
		Skipper: func(c echo.Context) bool {
			return !network.IsKubeletProbe(c.Request())
		},
		HealthCheck: func() error { return nil },
	}
)

Functions

func K8sHealthz

func K8sHealthz() echo.MiddlewareFunc

K8sHealthz returns MiddlewareFunc.

func K8sHealthzWithConfig

func K8sHealthzWithConfig(config K8sHealthzConfig) echo.MiddlewareFunc

K8sHealthzWithConfig returns a X-Request-ID middleware with config.

func K8sProbe

func K8sProbe(h string, v string) echo.MiddlewareFunc

K8sProbe returns a ready status.

Types

type K8sHealthzConfig

type K8sHealthzConfig struct {
	// Skipper defines a function to skip middleware.
	Skipper     func(echo.Context) bool
	HealthCheck func() error
}

K8sHealthzConfig defines the config for K8sHealthz middleware.

Jump to

Keyboard shortcuts

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