socketactivation

package
v0.0.0-...-6b0d3aa Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2022 License: AGPL-3.0 Imports: 0 Imported by: 0

Documentation

Overview

Package socketactivation provides conditional support for systemd socket activation.

By default, this package is disabled, and all functions are merely dummies. To enable, build like so:

go build -tags systemd

Index

Constants

View Source
const (
	// Enabled allows consumers to check if support was enabled at compile
	// time.
	Enabled bool = enabled

	// ErrNotEnabled is returned when a caller attempts to call a function
	// that requires support for socket activation.
	ErrNotEnabled = err("socket activation was not enabled at compile time")
)

Variables

This section is empty.

Functions

func CountListeners

func CountListeners() int

CountListeners determines how many sockets have been passed.

When Enabled = false, this function always returns zero (0).

func Serve

func Serve() error

Serve will attempt to serve HTTP on the passed in socket.

When Enabled = false, this function always returns ErrNotEnabled.

Types

This section is empty.

Jump to

Keyboard shortcuts

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