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(featureDetector environment.FeatureDetectorIface, opts ...NetlinkHandleManagerOpt) *HandleManager
func (*HandleManager) Handle ¶
func (r *HandleManager) Handle() (netlinkshim.Interface, error)
Handle returns the cached netlink handle, initialising it if needed.
func (*HandleManager) MarkHandleForReopen ¶
func (r *HandleManager) MarkHandleForReopen()
MarkHandleForReopen ensures that the next call to Handle() will open a fresh handle. The current handle is not closed immediately, it will be closed when the new handle is opened.
We used to close the handle immediately but that led to bugs where the caller wouldn't refresh its handle until the next time around its loop.
type NetlinkHandleManagerOpt ¶
type NetlinkHandleManagerOpt func(*HandleManager)
func WithNewHandleOverride ¶
func WithNewHandleOverride(newNetlinkHandle func() (netlinkshim.Interface, error)) NetlinkHandleManagerOpt
func WithSocketTimeout ¶
func WithSocketTimeout(d time.Duration) NetlinkHandleManagerOpt
func WithStrictModeOverride ¶
func WithStrictModeOverride(strictEnabled bool) NetlinkHandleManagerOpt
Click to show internal directories.
Click to hide internal directories.