linux

package
v0.0.0-pre.5 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const SystemdListenFDsStart = 3

SystemdListenFDsStart is the number of the first file descriptor that might have been opened by systemd when socket activation is enabled. It's always 3 in real-world usage (i.e. the first file descriptor opened after stdin, stdout and stderr), so this constant should always be the value passed to GetListeners, except for unit tests.

Variables

This section is empty.

Functions

func GetSystemdListeners

func GetSystemdListeners(start int) []net.Listener

GetSystemdListeners returns the socket-activated network listeners, if any.

The 'start' parameter must be SystemdListenFDsStart, except in unit tests, see the docstring of SystemdListenFDsStart below.

func GetUcred

func GetUcred(conn *net.UnixConn) (*unix.Ucred, error)

GetUcred returns the credentials from the remote end of a unix socket.

Types

This section is empty.

Jump to

Keyboard shortcuts

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