handlemgr

package
v0.0.0-...-21cfbab Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2023 License: Apache-2.0, Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HandleManager

type HandleManager struct {
	// contains filtered or unexported fields
}

func NewHandleManager

func NewHandleManager(
	netlinkFamily int,
	featureDetector environment.FeatureDetectorIface,
	opts ...NetlinkHandleManagerOpt,
) *HandleManager

func (*HandleManager) CloseHandle

func (r *HandleManager) CloseHandle()

CloseHandle closes any existing netlink handle so the next call to Handle() is forced to create a new one. Intended to be called after a failure.

func (*HandleManager) Handle

func (r *HandleManager) Handle() (netlinkshim.Interface, error)

Handle returns the cached netlink handle, initialising it if needed.

type NetlinkHandleManagerOpt

type NetlinkHandleManagerOpt func(*HandleManager)

func WithNewHandleOverride

func WithNewHandleOverride(newNetlinkHandle func() (netlinkshim.Interface, error)) NetlinkHandleManagerOpt

func WithSocketTimeout

func WithSocketTimeout(d time.Duration) NetlinkHandleManagerOpt

Jump to

Keyboard shortcuts

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