cni

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2024 License: Apache-2.0 Imports: 17 Imported by: 1

Documentation

Index

Constants

View Source
const PodBucket = "pod"

Variables

This section is empty.

Functions

func Build added in v0.2.2

func Build(config *KNIConfig) (beta.KNIServer, error)

func ExtractPodBandwidthResources

func ExtractPodBandwidthResources(podAnnotations map[string]string) (ingress, egress *resource.Quantity, err error)

ExtractPodBandwidthResources extracts the ingress and egress from the given pod annotations

func NewKniService

func NewKniService(config *KNIConfig) (beta.KNIServer, error)

func NewKniServiceWithAllConfigs added in v0.2.2

func NewKniServiceWithAllConfigs(config *KNIConfig) (beta.KNIServer, error)

Types

type KNICNIService

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

func (*KNICNIService) AttachInterface

func (*KNICNIService) CreateNetwork

func (*KNICNIService) DeleteNetwork

func (*KNICNIService) DetachInterface

func (*KNICNIService) QueryNodeNetworks

func (*KNICNIService) QueryPodNetwork

type KNIConfig

type KNIConfig struct {
	IfPrefix       string
	Db             string
	CNIBin         string
	CNIConf        string
	LoadAllConfigs bool
}

func CreateDefaultConfig

func CreateDefaultConfig() KNIConfig

type NetworkStorage

type NetworkStorage struct {
	IP           map[string]*beta.IPConfig
	Annotations  map[string]string
	Extradata    map[string]string
	Uid          string
	Netns_path   string
	PodName      string
	PodNamespace string
}

type Store

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

func New

func New(dbName string) (*Store, error)

func (*Store) Delete

func (s *Store) Delete(id string) error

func (*Store) Query

func (s *Store) Query(id string) (*NetworkStorage, error)

func (*Store) Save

func (s *Store) Save(id string, netstore NetworkStorage) error

Jump to

Keyboard shortcuts

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