server

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2026 License: Apache-2.0 Imports: 73 Imported by: 0

Documentation

Index

Constants

View Source
const StatusClientClosed = 499

Variables

View Source
var InterruptFlags = []os.Signal{os.Interrupt, syscall.SIGTERM}

Begin a graceful shutdown

Functions

func ListenAndServe

func ListenAndServe(cfg *config.Config, ent *entities.Entities, onReady func(reloadEntitiesFunc)) error

onReady, if set, receives the reload function once the server can accept reloads

func SetupHealth added in v0.8.0

func SetupHealth(ctx context.Context, cfg *config.Config, layerGroup *layers.LayerGroup, caches *caches.CacheRegistry) (func(context.Context) error, func(), error)

func ValidateCacheControl added in v0.12.0

func ValidateCacheControl(cfg config.CacheControlConfig, path string, errorMessages config.ErrorMessages) error

path is the dotted prefix of the block so the message names the right place

func ValidateConfig added in v0.13.0

func ValidateConfig(cfg *config.Config) error

func ValidateHealthChecks added in v0.13.0

func ValidateHealthChecks(cfg *config.Config, ent *entities.Entities) error

func ValidateTLS added in v0.15.0

func ValidateTLS(ctx context.Context, cfg *config.Config, reg *tlsprofiles.Registry) error

Catches what ListenAndServe would reject, without reading deprecated certificate files config check never required

Types

type CheckResult added in v0.8.0

type CheckResult struct {
	// contains filtered or unexported fields
}

type MultiHandler added in v0.6.0

type MultiHandler struct {
	// contains filtered or unexported fields
}

Fans every record out to its child handlers

func (MultiHandler) Enabled added in v0.6.0

func (h MultiHandler) Enabled(c context.Context, l slog.Level) bool

func (MultiHandler) Handle added in v0.6.0

func (h MultiHandler) Handle(c context.Context, r slog.Record) error

func (MultiHandler) WithAttrs added in v0.6.0

func (h MultiHandler) WithAttrs(attrs []slog.Attr) slog.Handler

func (MultiHandler) WithGroup added in v0.6.0

func (h MultiHandler) WithGroup(name string) slog.Handler

Jump to

Keyboard shortcuts

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