types

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultConfDir is the default dir where configurations are found
	DefaultConfDir = "/etc/cni/net.d/nv-ipam.d"
	// DefaultDaemonSocket is the default socket path for the daemon
	DefaultDaemonSocket = "unix:///var/lib/cni/nv-ipam/daemon.sock"
	// DefaultDaemonCallTimeoutSeconds is the default timeout IPAM daemon calls
	DefaultDaemonCallTimeoutSeconds = 5
	// DefaultLogFile default log file path to be used for logging
	DefaultLogFile = "/var/log/nv-ipam-cni.log"
	// DefaultLogLevel is the default log level
	DefaultLogLevel = "info"
	// ConfFileName is the name of CNI configuration file found in conf dir
	ConfFileName = "nv-ipam.conf"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfLoader added in v0.0.3

type ConfLoader interface {
	// LoadConf loads CNI configuration from Json data
	LoadConf(bytes []byte) (*NetConf, error)
}

ConfLoader loads CNI configuration

func NewConfLoader added in v0.0.3

func NewConfLoader() ConfLoader

type IPAMConf

type IPAMConf struct {
	types.IPAM

	// PoolName is the name of the pool to be used to allocate IP
	PoolName string `json:"poolName,omitempty"`
	// Address of the NVIDIA-ipam DaemonSocket
	DaemonSocket             string `json:"daemonSocket,omitempty"`
	DaemonCallTimeoutSeconds int    `json:"daemonCallTimeoutSeconds,omitempty"`
	ConfDir                  string `json:"confDir,omitempty"`
	LogFile                  string `json:"logFile,omitempty"`
	LogLevel                 string `json:"logLevel,omitempty"`

	// internal fields
	Pools []string `json:"-"`
}

IPAMConf is the configuration supported by our CNI plugin

type NetConf

type NetConf struct {
	Name       string    `json:"name"`
	CNIVersion string    `json:"cniVersion"`
	IPAM       *IPAMConf `json:"ipam"`
	DeviceID   string    `json:"deviceID"`
}

NetConf is CNI network config

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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