systemdutil

package module
v0.0.0-...-cd08cfa Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2023 License: Unlicense Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ActivationFiles

func ActivationFiles() []*os.File

func Find

func Find(sockets []TcpOrUdp, start int, udp bool) int

func Init

func Init()

func ListenSystemd

func ListenSystemd(files []*os.File) (udps []net.PacketConn, https, grpcs []net.Listener)

func ListenSystemdEx

func ListenSystemdEx(files []*os.File) (udps []net.PacketConn, tcps []net.Listener, err error)

func MustListenTCPSlice

func MustListenTCPSlice(what []string) (tcps []net.Listener)

func MustListenUDPSlice

func MustListenUDPSlice(what []string) (udps []net.PacketConn)

func ServeAll

func ServeAll(gs Server, https, grpcs []net.Listener)

func ServeH2C

func ServeH2C(gs GServer, https, grpcs []net.Listener)

func ServeH2C2

func ServeH2C2(gs GServer, handler http.Handler, https, grpcs []net.Listener)

func SplitListen

func SplitListen(s string) []string

func WaitSigint

func WaitSigint()

Types

type Fatalf

type Fatalf interface {
	Fatalf(format string, v ...interface{})
	Printf(format string, v ...interface{})
}
var Logger Fatalf = log.Default()

type GServer

type GServer interface {
	http.Handler
	Serve(net.Listener) error
}

type Server

type Server interface {
	Serve(net.Listener) error
}

type TcpOrUdp

type TcpOrUdp struct {
	Tcp  net.Listener
	Udp  net.PacketConn
	Name string
	Err  error
}

func WrapSystemdSockets

func WrapSystemdSockets(files []*os.File) (result []TcpOrUdp)

WrapSystemdSockets will take a list of files from Files function and create UDP sockets or TCP listeners for them.

Jump to

Keyboard shortcuts

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