util

package
v0.0.0-...-cda5842 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2023 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddDefaultFlags

func AddDefaultFlags(flags *pflag.FlagSet)

func GetManagementHandler

func GetManagementHandler() http.Handler

func GetServerForHandler

func GetServerForHandler(handler http.Handler) http.Server

func GetSystemdListenersOrDie

func GetSystemdListenersOrDie(socketFdName string, listenersByName map[string][]net.Listener) []net.Listener

func GetTcpListenerOrDie

func GetTcpListenerOrDie(tcpAddr string) net.Listener

func GetUnixSocketListenerOrDie

func GetUnixSocketListenerOrDie(socketPath string) net.Listener

func HandleServerShutdown

func HandleServerShutdown(done context.Context, server http.Server, listener net.Listener) error

func IntOrDefault

func IntOrDefault(value int64, defaultValue int64) int64

func SetupLogging

func SetupLogging() error

func StartHttpHandler

func StartHttpHandler(startErrGroup *errgroup.Group, shutdownErrGroup *errgroup.Group, done context.Context, listener net.Listener, handler http.Handler)

func StartServer

func StartServer(server http.Server, listener net.Listener) error

func StringOrDefault

func StringOrDefault(value string, defaultValue string) string

func WaitForSignalGracefulShutdown

func WaitForSignalGracefulShutdown(cancel context.CancelFunc, startErrGroup *errgroup.Group, shutdownErrGroup *errgroup.Group)

Types

This section is empty.

Jump to

Keyboard shortcuts

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