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: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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