server

package
v1.20.1 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2026 License: Apache-2.0 Imports: 14 Imported by: 2 modules, 3 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

This section is empty.

Functions

This section is empty.

Types

type Settings

type Settings struct {
	ServiceName    string
	ServerCertPath string
	ServerKeyPath  string
	ClientCAPaths  []string
	ListenPort     string
	ListenAddr     string
}

type WebhookServer

type WebhookServer struct {
	Settings  *Settings
	Namespace string
	Router    chi.Router
	Logger    *log.Logger
	// contains filtered or unexported fields
}

func NewWebhookServer added in v1.14.3

func NewWebhookServer(settings *Settings, namespace string, router chi.Router, logger *log.Logger) *WebhookServer

func (*WebhookServer) Shutdown added in v1.18.0

func (s *WebhookServer) Shutdown(ctx context.Context) error

Shutdown gracefully stops the webhook https server. It is safe to call when the server was never started or has already been shut down — both return nil. The provided ctx bounds how long Shutdown waits for in-flight handlers.

func (*WebhookServer) Start

func (s *WebhookServer) Start() error

Start runs https server to listen for AdmissionReview requests from the API-server. Start does not block; the server runs in its own goroutine. A non-nil error means the server failed to bind or load TLS material. Once Start returns nil, the only way the server stops is via Shutdown.

Jump to

Keyboard shortcuts

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