netutil

package
v0.0.0-...-f890545 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: GPL-3.0 Imports: 8 Imported by: 45

Documentation

Index

Constants

View Source
const (
	// https://developer.gnome.org/NetworkManager/stable/nm-dbus-types.html#NMMetered
	NetworkManagerMeteredUnknown  = 0
	NetworkManagerMeteredYes      = 1
	NetworkManagerMeteredNo       = 2
	NetworkManagerMeteredGuessYes = 3
	NetworkManagerMeteredGuessNo  = 4
)

Variables

This section is empty.

Functions

func ActivationListeners

func ActivationListeners() (lns map[string]net.Listener, err error)

ActivationListeners builds a map of addresses to listeners that were passed during systemd activation

func GetListener

func GetListener(socketPath string, listenerMap map[string]net.Listener) (net.Listener, error)

GetListener tries to get a listener for the given socket path from the listener map, and if it fails it tries to set it up directly.

func IsOnMeteredConnection

func IsOnMeteredConnection() (bool, error)

IsOnMeteredConnection checks whether the current default network connection is metered. If the state can not be determined, returns false and an error.

Types

This section is empty.

Jump to

Keyboard shortcuts

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