server

package
v0.0.0-...-f5bbbf4 Latest Latest
Warning

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

Go to latest
Published: May 2, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(cfg *Config) *http.Server

func NewHealthz

func NewHealthz(cfg *Config) *http.Server

Types

type CheckFunc

type CheckFunc func(context.Context) error

type Config

type Config struct {
	Host        string
	HealthzPort uint32
	Port        uint32

	TLSConfig *tls.Config

	Timeout               time.Duration
	KeepAlive             time.Duration
	IdleConnTimeout       time.Duration
	TLSHandshakeTimeout   time.Duration
	ExpectContinueTimeout time.Duration
	MaxIdleConnsPerHost   int
}

func NewDefaultConfig

func NewDefaultConfig() *Config

type HealthzHandler

type HealthzHandler struct {
	http.ServeMux
	// contains filtered or unexported fields
}

func NewHealthzHandler

func NewHealthzHandler() *HealthzHandler

func (*HealthzHandler) AddLivenessCheck

func (s *HealthzHandler) AddLivenessCheck(name string, check CheckFunc)

func (*HealthzHandler) AddReadinessCheck

func (s *HealthzHandler) AddReadinessCheck(name string, check CheckFunc)

func (*HealthzHandler) LiveEndpoint

func (s *HealthzHandler) LiveEndpoint(w http.ResponseWriter, r *http.Request)

func (*HealthzHandler) ReadyEndpoint

func (s *HealthzHandler) ReadyEndpoint(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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