network

package
v0.5.15 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2024 License: Apache-2.0 Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NetworkManager

type NetworkManager interface {
	// ApplyNetClass applies the net class config for a container.
	ApplyNetClass(podUID, containerId string, data *common.NetClsData) error
	// ListNetClass lists the net class config for all containers managed by kubernetes.
	ListNetClass() ([]*common.NetClsData, error)
	// ClearNetClass clears the net class config for a container.
	ClearNetClass(cgroupID uint64) error
}

NetworkManager provides methods that control network resources.

func NewNetworkManager

func NewNetworkManager() NetworkManager

NewNetworkManager returns a defaultNetworkManager.

type NetworkManagerStub added in v0.5.9

type NetworkManagerStub struct {
	sync.RWMutex
	NetClassMap map[string]map[string]*common.NetClsData
}

func (*NetworkManagerStub) ApplyNetClass added in v0.5.9

func (n *NetworkManagerStub) ApplyNetClass(podUID, containerId string, data *common.NetClsData) error

func (*NetworkManagerStub) ClearNetClass added in v0.5.9

func (n *NetworkManagerStub) ClearNetClass(cgroupID uint64) error

func (*NetworkManagerStub) ListNetClass added in v0.5.9

func (n *NetworkManagerStub) ListNetClass() ([]*common.NetClsData, error)

Jump to

Keyboard shortcuts

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