datastructs

package
v4.2.2 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2021 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OptimisticLockErrorMsg = "the object has been modified; please apply your changes to the latest version and try again"
	MinV4MaskLength        = 32
	MaxV4MaskLength        = 9
	MaxV6PrefixLength      = 105
	MinV6PrefixLength      = 128
)

Variables

View Source
var (
	SupportedCniVersions = version.PluginSupports("0.3.1")
	LegacyNamingScheme   = "legacy"
)

Functions

This section is empty.

Types

type CniArgs

type CniArgs struct {
	Namespace      string
	Netns          string
	PodName        string
	ContainerId    string
	StdIn          []byte
	Interfaces     []Interface
	Pod            *core_v1.Pod
	DefaultNetwork *danmtypes.DanmNet
}

type CniBackendConfig

type CniBackendConfig struct {
	CNIVersion   string
	ReadConfig   CniConfigReader
	IpamNeeded   bool
	DeviceNeeded bool
}

type CniConfigReader

type CniConfigReader func(netInfo *danmtypes.DanmNet, ipam IpamConfig, ep *danmtypes.DanmEp, cniVersion string) ([]byte, error)

type Interface

type Interface struct {
	Network          string            `json:"network,omitempty"`
	TenantNetwork    string            `json:"tenantNetwork,omitempty"`
	ClusterNetwork   string            `json:"clusterNetwork,omitempty"`
	Ip               string            `json:"ip,omitempty"`
	Ip6              string            `json:"ip6,omitempty"`
	Proutes          map[string]string `json:"proutes,omitempty"`
	Proutes6         map[string]string `json:"proutes6,omitempty"`
	DefaultIfaceName string
	Device           string
	SequenceId       int
}

Interface represents a request coming from the Pod to connect it to one DanmNet during CNI_ADD operation It contains the name of the network object the Pod should be connected to, and other optional requests Pods can influence the scheme of IP allocation (dynamic, static, none), and can ask for the provisioning of policy-based IP routes

type IpamConfig

type IpamConfig struct {
	Type string   `json:"type"`
	Ips  []IpamIp `json:"ips,omitempty"`
}

type IpamIp

type IpamIp struct {
	IpCidr  string `json:"ipcidr"`
	Version int    `json:"version"`
}

type NetConf

type NetConf struct {
	types.NetConf
	Kubeconfig   string `json:"kubeconfig"`
	CniConfigDir string `json:"cniDir"`
	NamingScheme string `json:"namingScheme"`
}

Jump to

Keyboard shortcuts

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