Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GivePermissions ¶ added in v0.0.2
GivePermissions will give read/write permissions on a file to a specified user id.
Types ¶
type FakeHandler ¶
type FakeHandler interface { Handler SetKernalVersion(version string) SetAllowsUnprivilegedBpf(allowed bool) }
FakeHandler interface extends the Handler interface to provide additional testing methods.
func NewFakeHandler ¶
func NewFakeHandler() FakeHandler
NewFakeHandler returns an implementation of the FakeHandler interface.
type Handler ¶
type Handler interface { AllowsUnprivilegedBpf() (bool, error) KernelVersion() (string, error) HasEthtool() (bool, string, error) HasLibbpf() (bool, []string, error) HasDevlink() (bool, string, error) Hostname() (string, error) }
Handler is the CNI and device plugins interface to the host. The interface exists for testing purposes, allowing unit tests to test against a fake API.
func NewHandler ¶
func NewHandler() Handler
NewHandler returns an implementation of the Handler interface.
Click to show internal directories.
Click to hide internal directories.