server

package
v1.18.0 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2026 License: Apache-2.0 Imports: 14 Imported by: 3

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