activation

package
v0.0.0-...-bd91192 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package activation implements primitives for systemd socket activation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Files

func Files(unsetEnv bool) []*os.File

Files returns a slice containing a `os.File` object for each file descriptor passed to this process via systemd fd-passing protocol.

The order of the file descriptors is preserved in the returned slice. `unsetEnv` is typically set to `true` in order to avoid clashes in fd usage and to avoid leaking environment flags to child processes.

func Listeners

func Listeners() ([]net.Listener, error)

Listeners returns a slice containing a net.Listener for each matching socket type passed to this process.

The order of the file descriptors is preserved in the returned slice. Nil values are used to fill any gaps. For example if systemd were to return file descriptors corresponding with "udp, tcp, tcp", then the slice would contain {nil, net.Listener, net.Listener}

func ListenersWithNames

func ListenersWithNames() (map[string][]net.Listener, error)

ListenersWithNames maps a listener name to a set of net.Listener instances.

func PacketConns

func PacketConns() ([]net.PacketConn, error)

PacketConns returns a slice containing a net.PacketConn for each matching socket type passed to this process.

The order of the file descriptors is preserved in the returned slice. Nil values are used to fill any gaps. For example if systemd were to return file descriptors corresponding with "udp, tcp, udp", then the slice would contain {net.PacketConn, nil, net.PacketConn}

func TLSListeners

func TLSListeners(tlsConfig *tls.Config) ([]net.Listener, error)

TLSListeners returns a slice containing a net.listener for each matching TCP socket type passed to this process. It uses default Listeners func and forces TCP sockets handlers to use TLS based on tlsConfig.

func TLSListenersWithNames

func TLSListenersWithNames(tlsConfig *tls.Config) (map[string][]net.Listener, error)

TLSListenersWithNames maps a listener name to a net.Listener with the associated TLS configuration.

Types

This section is empty.

Jump to

Keyboard shortcuts

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