nncp

package
v0.0.0-...-07a2936 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Address

type Address struct {
	Ip           string `yaml:"ip,omitempty"`
	PrefixLength int    `yaml:"prefix-length,omitempty"`
	MptcpFlags   string `yaml:"mptcp-flags,omitempty"`
}

type DesiredState

type DesiredState struct {
	DnsResolver DnsResolver  `yaml:"dns-resolver,omitempty"`
	Interfaces  []Interfaces `yaml:"interfaces"`
	Routes      Routes       `yaml:"routes,omitempty"`
}

type DnsConfig

type DnsConfig struct {
	Servers []string `yaml:"server"`
	Search  []string `yaml:"search"`
}

type DnsResolver

type DnsResolver struct {
	Config DnsConfig `yaml:"config"`
}

type Duplex

type Duplex string
const (
	Half Duplex = "half"
	Full Duplex = "full"
)

type Ethernet

type Ethernet struct {
	Speed           int    `yaml:"speed,omitempty"`
	Duplex          Duplex `yaml:"duplex,omitempty"`
	AutoNegotiation bool   `yaml:"auto-negotiation,omitempty"`
}

type Identifier

type Identifier string
const (
	Name       Identifier = "name"
	MacAddress Identifier = "mac-address"
)

type Interfaces

type Interfaces struct {
	Name        string     `yaml:"name"`
	IntfType    IntfType   `yaml:"type"`
	State       State      `yaml:"state"`
	Description string     `yaml:"description"`
	ProfileName string     `yaml:"profile-name,omitempty"`
	Identifier  Identifier `yaml:"identifier,omitempty"`
	MacAddress  string     `yaml:"mac-address,omitempty"`
	Mtu         int        `yaml:"mtu,omitempty"`
	MinMtu      int        `yaml:"min-mtu,omitempty"`
	MaxMtu      int        `yaml:"max-mtu,omitempty"`

	Ipv4            *IpAddress       `yaml:"ipv4,omitempty"`
	Ipv6            *IpAddress       `yaml:"ipv6,omitempty"`
	Ethernet        *Ethernet        `yaml:"ethernet,omitempty"`
	SrIov           *SrIov           `yaml:"sr-iov,omitempty"`
	LinkAggregation *LinkAggregation `yaml:"link-aggregation,omitempty"`
	Vlan            *Vlan            `yaml:"vlan,omitempty"`
}

type IntfType

type IntfType string
const (
	TypeEthernet    IntfType = "ethernet"
	TypeVLAN        IntfType = "vlan"
	TypeLinuxBridge IntfType = "linux-bridge"
	TypeBond        IntfType = "bond"
)

type IpAddress

type IpAddress struct {
	Enabled           bool      `yaml:"enabled"`
	Dhcp              bool      `yaml:"dhcp"`
	Address           []Address `yaml:"address,omitempty"`
	AutoConf          bool      `yaml:"autoconf,omitempty"`
	AutoDns           bool      `yaml:"auto-dns,omitempty"`
	AutoGateway       bool      `yaml:"auto-gateway,omitempty"`
	AutoRoutes        bool      `yaml:"auto-routes,omitempty"`
	AutoRouteTabledId int       `yaml:"auto-route-table-id,omitempty"`
	AutoRouteMetrics  int       `yaml:"auto-route-metrics,omitempty"`
}

type LinkAggregation

type LinkAggregation struct {
	Mode    Mode     `yaml:"mode,omitempty"`
	Options Options  `yaml:"options,omitempty"`
	Port    []string `yaml:"port,omitempty"`
}

type Metadata

type Metadata struct {
	Labels map[string]string `yaml:"labels,omitempty"`
	Name   string            `yaml:"name"`
}

type Mode

type Mode string
const (
	ActiveBackup Mode = "active-backup"
	BalanceRR    Mode = "balance-rr"
	BalanceXOR   Mode = "balance-xor"
	Broadcast    Mode = "broadcast"

	BalanceTLB Mode = "balance-tlb"
	BalanceALB Mode = "balance-alb"
)

type NNCP

type NNCP struct {
	metav1.TypeMeta   `yaml:",inline"`
	metav1.ObjectMeta `yaml:"metadata,omitempty"`

	Spec Spec `yaml:"spec"`
}

NNCP represents a neural network control protocol.

func NewNNCP

func NewNNCP() *NNCP

type Options

type Options struct {
	AllSlavesActive string `yaml:"all-slaves-active,omitempty"`
	ArpAllTargets   bool   `yaml:"arp-all-targets,omitempty"`
	ArpInterval     int    `yaml:"arp-interval,omitempty"`
	ArpValidate     bool   `yaml:"arp-validate,omitempty"`
	DownDelay       int    `yaml:"down-delay,omitempty"`
	LpInterval      int    `yaml:"lp-interval,omitempty"`
	Miimon          int    `yaml:"miimon,omitempty"`
	MinLinks        int    `yaml:"min-links,omitempty"`
	PacketsPerSlave int    `yaml:"packets-per-slave,omitempty"`
	PrimaryReselect bool   `yaml:"primary-reselect,omitempty"`
	ResendIGMP      int    `yaml:"resend-igmp,omitempty"`
	UpDelay         int    `yaml:"up-delay,omitempty"`
	UseCarrier      bool   `yaml:"use-carrier,omitempty"`
}

type RouteEntry

type RouteEntry struct {
	State            RouteState `yaml:"state,omitempty"`
	Destination      string     `yaml:"destination"`
	NextHopInterface string     `yaml:"next-hop-interface"`
	NextHopAddress   string     `yaml:"next-hop-address,omitempty"`
	Metric           int        `yaml:"metric,omitempty"`
	TableId          int        `yaml:"table-id,omitempty"`
	Cwnd             int        `yaml:"cwnd,omitempty"`
}

type RouteState

type RouteState string
const (
	RSabsent RouteState = "absent"
)

type Routes

type Routes struct {
	Config []RouteEntry `yaml:"config,omitempty"`
}

type Spec

type Spec struct {
	DesiredState DesiredState      `yaml:"desiredState"`
	NodeSelector map[string]string `yaml:"nodeSelector"`
}

type SrIov

type SrIov struct {
	TotalVfs int  `yaml:"total-vfs,omitempty"`
	Vfs      []Vf `yaml:"vfs,omitempty"`
}

type State

type State string
const (
	Up     State = "up"
	Down   State = "down"
	Ignore State = "ignore"
	Absent State = "absent"
)

type Vf

type Vf struct {
	MacAddress string    `yaml:"mac-address,omitempty"`
	SpoofCheck bool      `yaml:"spoof-check,omitempty"`
	Trust      bool      `yaml:"trust,omitempty"`
	MinTxRate  int       `yaml:"min-tx-rate,omitempty"`
	MaxTxRate  int       `yaml:"max-tx-rate,omitempty"`
	VlandId    int       `yaml:"vlan-id,omitempty"`
	Qos        int       `yaml:"qos,omitempty"`
	VlanProto  VlanProto `yaml:"vlan-protocol,omitempty"`
}

type Vlan

type Vlan struct {
	BaseIface string    `yaml:"base-interface"`
	Id        int       `yaml:"id"`
	Protocol  VlanProto `yaml:"protocol,omitempty"`
}

type VlanProto

type VlanProto string
const (
	Dot1Q  VlanProto = "802.1q"
	Dot1AD VlanProto = "802.1ad"
)

Jump to

Keyboard shortcuts

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