Documentation ¶
Overview ¶
Package network provides resources which describe networking subsystem state.
Index ¶
- Constants
- func AddressID(linkName string, addr netip.Prefix) string
- func AddressReady(spec *StatusSpec) bool
- func ConnectivityReady(spec *StatusSpec) bool
- func EtcFilesReady(spec *StatusSpec) bool
- func FilteredNodeAddressID(kind resource.ID, filterID string) resource.ID
- func HostnameReady(spec *StatusSpec) bool
- func IsULA(ip netip.Addr, purpose ULAPurpose) bool
- func LayeredID(layer ConfigLayer, id string) string
- func LinkID(linkName string) string
- func NotSideroLinkIP(ip netip.Addr) bool
- func OperatorID(operator Operator, linkName string) string
- func RouteID(table nethelpers.RoutingTable, family nethelpers.Family, ...) string
- func ULAPrefix(clusterID string, purpose ULAPurpose) netip.Prefix
- type AddressSpec
- type AddressSpecRD
- type AddressSpecSpec
- type AddressStatus
- type AddressStatusRD
- type AddressStatusSpec
- type BondMasterSpec
- type BondSlave
- type BridgeMasterSpec
- type BridgeSlave
- type ConfigLayer
- type DHCP4OperatorSpec
- type DHCP6OperatorSpec
- type DeviceConfigSpec
- type DeviceConfigSpecRD
- type DeviceConfigSpecSpec
- type HardwareAddr
- type HardwareAddrRD
- type HardwareAddrSpec
- type HostnameSpec
- type HostnameSpecRD
- type HostnameSpecSpec
- type HostnameStatus
- type HostnameStatusRD
- type HostnameStatusSpec
- type LinkRefresh
- type LinkRefreshRD
- type LinkRefreshSpec
- type LinkSpec
- type LinkSpecRD
- type LinkSpecSpec
- type LinkStatus
- type LinkStatusRD
- type LinkStatusSpec
- type NodeAddress
- type NodeAddressFilter
- type NodeAddressFilterRD
- type NodeAddressFilterSpec
- type NodeAddressRD
- type NodeAddressSpec
- type Operator
- type OperatorSpec
- type OperatorSpecRD
- type OperatorSpecSpec
- type ReadyCondition
- type ResolverSpec
- type ResolverSpecRD
- type ResolverSpecSpec
- type ResolverStatus
- type ResolverStatusRD
- type ResolverStatusSpec
- type RouteSpec
- type RouteSpecRD
- type RouteSpecSpec
- type RouteStatus
- type RouteStatusRD
- type RouteStatusSpec
- type STPSpec
- type Status
- type StatusCheck
- type StatusRD
- type StatusSpec
- type TimeServerSpec
- type TimeServerSpecRD
- type TimeServerSpecSpec
- type TimeServerStatus
- type TimeServerStatusRD
- type TimeServerStatusSpec
- type ULAPurpose
- type VIPEquinixMetalSpec
- type VIPHCloudSpec
- type VIPOperatorSpec
- type VLANSpec
- type WireguardPeer
- type WireguardSpec
Constants ¶
const ( LinkKindVLAN = "vlan" LinkKindBond = "bond" LinkKindBridge = "bridge" LinkKindWireguard = "wireguard" )
Link kinds.
const ( // Default node address (should be a single address in the spec). // // Used to set for example published etcd peer address. NodeAddressDefaultID = "default" // Current node addresses (as seen at the moment). // // Shows a list of addresses for the node for the UP interfaces. NodeAddressCurrentID = "current" // Accumulative list of the addresses node had over time. // // If some address is no longer present, it will be still kept in the accumulative list. NodeAddressAccumulativeID = "accumulative" // Routed current node addresses (as seen at the moment). // // This is current addresses minus 'external' IPs, and SideroLink IPs. // // This list is used to pick advertised/listen addresses for different services. NodeAddressRoutedID = "routed" )
NodeAddress well-known IDs.
const ( // ULAUnknown indicates an unknown ULA Purpose. ULAUnknown = 0x00 // ULABootstrap is the Unique Local Addressing space key for the Talos Self-Bootstrapping protocol. ULABootstrap = 0x01 // ULAKubeSpan is the Unique Local Addressing space key for the Talos KubeSpan feature. ULAKubeSpan = 0x02 // ULASideroLink is the Unique Local Addressing space key for the SideroLink feature. ULASideroLink = 0x03 )
const AddressSpecType = resource.Type("AddressSpecs.net.talos.dev")
AddressSpecType is type of AddressSpec resource.
const AddressStatusType = resource.Type("AddressStatuses.net.talos.dev")
AddressStatusType is type of AddressStatus resource.
const ConfigNamespaceName resource.Namespace = "network-config"
ConfigNamespaceName contains umerged resources related to networking generate from the configuration.
Resources in the ConfigNamespaceName namespace are merged to produce final versions in the NamespaceName namespace.
const DeviceConfigSpecType = resource.Type("DeviceConfigSpecs.net.talos.dev")
DeviceConfigSpecType is type of DeviceConfigSpec resource.
const FirstHardwareAddr = resource.ID("first")
FirstHardwareAddr is a resource ID for the first NIC HW addr.
const HardwareAddrType = resource.Type("HardwareAddresses.net.talos.dev")
HardwareAddrType is type of HardwareAddr resource.
const HostnameID resource.ID = "hostname"
HostnameID is the ID of the singleton instance.
const HostnameSpecType = resource.Type("HostnameSpecs.net.talos.dev")
HostnameSpecType is type of HostnameSpec resource.
const HostnameStatusType = resource.Type("HostnameStatuses.net.talos.dev")
HostnameStatusType is type of HostnameStatus resource.
const LinkRefreshType = resource.Type("LinkRefreshes.net.talos.dev")
LinkRefreshType is type of LinkRefresh resource.
const LinkSpecType = resource.Type("LinkSpecs.net.talos.dev")
LinkSpecType is type of LinkSpec resource.
const LinkStatusType = resource.Type("LinkStatuses.net.talos.dev")
LinkStatusType is type of LinkStatus resource.
const NamespaceName resource.Namespace = "network"
NamespaceName contains resources related to networking.
const NodeAddressFilterType = resource.Type("NodeAddressFilters.net.talos.dev")
NodeAddressFilterType is type of NodeAddressFilter resource.
const NodeAddressType = resource.Type("NodeAddresses.net.talos.dev")
NodeAddressType is type of NodeAddress resource.
const OperatorSpecType = resource.Type("OperatorSpecs.net.talos.dev")
OperatorSpecType is type of OperatorSpec resource.
const ResolverID resource.ID = "resolvers"
ResolverID is the ID of the singleton instance.
const ResolverSpecType = resource.Type("ResolverSpecs.net.talos.dev")
ResolverSpecType is type of ResolverSpec resource.
const ResolverStatusType = resource.Type("ResolverStatuses.net.talos.dev")
ResolverStatusType is type of ResolverStatus resource.
const RouteSpecType = resource.Type("RouteSpecs.net.talos.dev")
RouteSpecType is type of RouteSpec resource.
const RouteStatusType = resource.Type("RouteStatuses.net.talos.dev")
RouteStatusType is type of RouteStatus resource.
const StatusID resource.ID = "status"
StatusID is the resource ID of the singleton instance.
const StatusType = resource.Type("NetworkStatuses.net.talos.dev")
StatusType is type of Status resource.
const TimeServerID resource.ID = "timeservers"
TimeServerID is the ID of the singleton instance.
const TimeServerSpecType = resource.Type("TimeServerSpecs.net.talos.dev")
TimeServerSpecType is type of TimeServerSpec resource.
const TimeServerStatusType = resource.Type("TimeServerStatuses.net.talos.dev")
TimeServerStatusType is type of TimeServerStatus resource.
Variables ¶
This section is empty.
Functions ¶
func AddressReady ¶
func AddressReady(spec *StatusSpec) bool
AddressReady checks if address is ready.
func ConnectivityReady ¶
func ConnectivityReady(spec *StatusSpec) bool
ConnectivityReady checks if connectivity is ready.
func EtcFilesReady ¶
func EtcFilesReady(spec *StatusSpec) bool
EtcFilesReady checks if etc files are ready.
func FilteredNodeAddressID ¶
FilteredNodeAddressID returns resource ID for node addresses with filter applied.
func HostnameReady ¶
func HostnameReady(spec *StatusSpec) bool
HostnameReady checks if hostname is ready.
func IsULA ¶
func IsULA(ip netip.Addr, purpose ULAPurpose) bool
IsULA checks whether IP address is a Unique Local Address with the specific purpose.
func LayeredID ¶
func LayeredID(layer ConfigLayer, id string) string
LayeredID builds configuration for the entity at some layer.
func NotSideroLinkIP ¶
NotSideroLinkIP is a shorthand for !IsULA(ip, ULASideroLink).
func OperatorID ¶
OperatorID builds ID (primary key) for the operators.
func RouteID ¶
func RouteID(table nethelpers.RoutingTable, family nethelpers.Family, destination netip.Prefix, gateway netip.Addr, priority uint32) string
RouteID builds ID (primary key) for the route.
func ULAPrefix ¶
func ULAPrefix(clusterID string, purpose ULAPurpose) netip.Prefix
ULAPrefix calculates and returns a Talos-specific Unique Local Address prefix for the given purpose. This implements a Talos-specific implementation of RFC4193. The Talos implementation uses a combination of a 48-bit cluster-unique portion with an 8-bit purpose portion.
Types ¶
type AddressSpec ¶
type AddressSpec = typed.Resource[AddressSpecSpec, AddressSpecRD]
AddressSpec resource holds physical network link status.
func NewAddressSpec ¶
func NewAddressSpec(namespace resource.Namespace, id resource.ID) *AddressSpec
NewAddressSpec initializes a AddressSpec resource.
type AddressSpecRD ¶
type AddressSpecRD struct{}
AddressSpecRD provides auxiliary methods for AddressSpec.
func (AddressSpecRD) ResourceDefinition ¶
func (AddressSpecRD) ResourceDefinition(resource.Metadata, AddressSpecSpec) meta.ResourceDefinitionSpec
ResourceDefinition implements typed.ResourceDefinition interface.
type AddressSpecSpec ¶
type AddressSpecSpec struct { Address netip.Prefix `yaml:"address" protobuf:"1"` LinkName string `yaml:"linkName" protobuf:"2"` Family nethelpers.Family `yaml:"family" protobuf:"3"` Scope nethelpers.Scope `yaml:"scope" protobuf:"4"` Flags nethelpers.AddressFlags `yaml:"flags" protobuf:"5"` AnnounceWithARP bool `yaml:"announceWithARP,omitempty" protobuf:"6"` ConfigLayer ConfigLayer `yaml:"layer" protobuf:"7"` }
AddressSpecSpec describes status of rendered secrets.
func (AddressSpecSpec) DeepCopy ¶
func (o AddressSpecSpec) DeepCopy() AddressSpecSpec
DeepCopy generates a deep copy of AddressSpecSpec.
type AddressStatus ¶
type AddressStatus = typed.Resource[AddressStatusSpec, AddressStatusRD]
AddressStatus resource holds physical network link status.
func NewAddressStatus ¶
func NewAddressStatus(namespace resource.Namespace, id resource.ID) *AddressStatus
NewAddressStatus initializes a AddressStatus resource.
type AddressStatusRD ¶
type AddressStatusRD struct{}
AddressStatusRD provides auxiliary methods for AddressStatus.
func (AddressStatusRD) ResourceDefinition ¶
func (AddressStatusRD) ResourceDefinition(resource.Metadata, AddressStatusSpec) meta.ResourceDefinitionSpec
ResourceDefinition implements typed.ResourceDefinition interface.
type AddressStatusSpec ¶
type AddressStatusSpec struct { Address netip.Prefix `yaml:"address" protobuf:"1"` Local netip.Addr `yaml:"local,omitempty" protobuf:"2"` Broadcast netip.Addr `yaml:"broadcast,omitempty" protobuf:"3"` Anycast netip.Addr `yaml:"anycast,omitempty" protobuf:"4"` Multicast netip.Addr `yaml:"multicast,omitempty" protobuf:"5"` LinkIndex uint32 `yaml:"linkIndex" protobuf:"6"` LinkName string `yaml:"linkName" protobuf:"7"` Family nethelpers.Family `yaml:"family" protobuf:"8"` Scope nethelpers.Scope `yaml:"scope" protobuf:"9"` Flags nethelpers.AddressFlags `yaml:"flags" protobuf:"10"` }
AddressStatusSpec describes status of rendered secrets.
func (AddressStatusSpec) DeepCopy ¶
func (o AddressStatusSpec) DeepCopy() AddressStatusSpec
DeepCopy generates a deep copy of AddressStatusSpec.
type BondMasterSpec ¶
type BondMasterSpec struct { Mode nethelpers.BondMode `yaml:"mode" protobuf:"1"` HashPolicy nethelpers.BondXmitHashPolicy `yaml:"xmitHashPolicy" protobuf:"2"` LACPRate nethelpers.LACPRate `yaml:"lacpRate" protobuf:"3"` ARPValidate nethelpers.ARPValidate `yaml:"arpValidate" protobuf:"4"` ARPAllTargets nethelpers.ARPAllTargets `yaml:"arpAllTargets" protobuf:"5"` PrimaryIndex uint32 `yaml:"primary,omitempty" protobuf:"6"` PrimaryReselect nethelpers.PrimaryReselect `yaml:"primaryReselect" protobuf:"7"` FailOverMac nethelpers.FailOverMAC `yaml:"failOverMac" protobuf:"8"` ADSelect nethelpers.ADSelect `yaml:"adSelect,omitempty" protobuf:"9"` MIIMon uint32 `yaml:"miimon,omitempty" protobuf:"10"` UpDelay uint32 `yaml:"updelay,omitempty" protobuf:"11"` DownDelay uint32 `yaml:"downdelay,omitempty" protobuf:"12"` ARPInterval uint32 `yaml:"arpInterval,omitempty" protobuf:"13"` ResendIGMP uint32 `yaml:"resendIgmp,omitempty" protobuf:"14"` MinLinks uint32 `yaml:"minLinks,omitempty" protobuf:"15"` LPInterval uint32 `yaml:"lpInterval,omitempty" protobuf:"16"` PacketsPerSlave uint32 `yaml:"packetsPerSlave,omitempty" protobuf:"17"` NumPeerNotif uint8 `yaml:"numPeerNotif,omitempty" protobuf:"18"` TLBDynamicLB uint8 `yaml:"tlbLogicalLb,omitempty" protobuf:"19"` AllSlavesActive uint8 `yaml:"allSlavesActive,omitempty" protobuf:"20"` UseCarrier bool `yaml:"useCarrier,omitempty" protobuf:"21"` ADActorSysPrio uint16 `yaml:"adActorSysPrio,omitempty" protobuf:"22"` ADUserPortKey uint16 `yaml:"adUserPortKey,omitempty" protobuf:"23"` PeerNotifyDelay uint32 `yaml:"peerNotifyDelay,omitempty" protobuf:"24"` }
BondMasterSpec describes bond settings if Kind == "bond".
type BondSlave ¶
type BondSlave struct { // MasterName indicates master link for enslaved bonded interfaces. MasterName string `yaml:"masterName,omitempty" protobuf:"1"` // SlaveIndex indicates a slave's position in bond. SlaveIndex int `yaml:"slaveIndex,omitempty" protobuf:"2"` }
BondSlave contains a bond's master name and slave index.
type BridgeMasterSpec ¶
type BridgeMasterSpec struct {
STP STPSpec `yaml:"stp,omitempty" protobuf:"1"`
}
BridgeMasterSpec describes bridge settings if Kind == "bridge".
type BridgeSlave ¶
type BridgeSlave struct { // MasterName indicates master link for enslaved bridged interfaces. MasterName string `yaml:"masterName,omitempty" protobuf:"1"` }
BridgeSlave contains a bond's master name and slave index.
type ConfigLayer ¶
type ConfigLayer int
ConfigLayer describes network configuration layers, with lowest priority first.
const ( ConfigDefault ConfigLayer = iota // default ConfigCmdline // cmdline ConfigPlatform // platform ConfigOperator // operator ConfigMachineConfiguration // configuration )
Configuration layers.
func ConfigLayerString ¶
func ConfigLayerString(s string) (ConfigLayer, error)
ConfigLayerString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.
func ConfigLayerValues ¶
func ConfigLayerValues() []ConfigLayer
ConfigLayerValues returns all values of the enum
func (ConfigLayer) IsAConfigLayer ¶
func (i ConfigLayer) IsAConfigLayer() bool
IsAConfigLayer returns "true" if the value is listed in the enum definition. "false" otherwise
func (ConfigLayer) MarshalText ¶
func (i ConfigLayer) MarshalText() ([]byte, error)
MarshalText implements the encoding.TextMarshaler interface for ConfigLayer
func (ConfigLayer) String ¶
func (i ConfigLayer) String() string
func (*ConfigLayer) UnmarshalText ¶
func (i *ConfigLayer) UnmarshalText(text []byte) error
UnmarshalText implements the encoding.TextUnmarshaler interface for ConfigLayer
type DHCP4OperatorSpec ¶
type DHCP4OperatorSpec struct { RouteMetric uint32 `yaml:"routeMetric" protobuf:"1"` SkipHostnameRequest bool `yaml:"skipHostnameRequest,omitempty" protobuf:"2"` }
DHCP4OperatorSpec describes DHCP4 operator options.
type DHCP6OperatorSpec ¶
type DHCP6OperatorSpec struct { DUID string `yaml:"DUID,omitempty" protobuf:"1"` RouteMetric uint32 `yaml:"routeMetric" protobuf:"2"` SkipHostnameRequest bool `yaml:"skipHostnameRequest,omitempty" protobuf:"3"` }
DHCP6OperatorSpec describes DHCP6 operator options.
type DeviceConfigSpec ¶
type DeviceConfigSpec = typed.Resource[DeviceConfigSpecSpec, DeviceConfigSpecRD]
DeviceConfigSpec resource holds network interface configs.
func NewDeviceConfig ¶
func NewDeviceConfig(id resource.ID, device config.Device) *DeviceConfigSpec
NewDeviceConfig creates new interface config.
type DeviceConfigSpecRD ¶
type DeviceConfigSpecRD struct{}
DeviceConfigSpecRD providers auxiliary methods for DeviceConfigSpec.
func (DeviceConfigSpecRD) ResourceDefinition ¶
func (DeviceConfigSpecRD) ResourceDefinition(resource.Metadata, DeviceConfigSpecSpec) meta.ResourceDefinitionSpec
ResourceDefinition implements typed.ResourceDefinition interface.
type DeviceConfigSpecSpec ¶
DeviceConfigSpecSpec contains the spec of a device config.
func (DeviceConfigSpecSpec) DeepCopy ¶
func (spec DeviceConfigSpecSpec) DeepCopy() DeviceConfigSpecSpec
DeepCopy generates a deep copy of DeviceConfigSpecSpec.
func (*DeviceConfigSpecSpec) MarshalProto ¶
func (spec *DeviceConfigSpecSpec) MarshalProto() ([]byte, error)
MarshalProto implements ProtoMarshaler.
func (*DeviceConfigSpecSpec) UnmarshalProto ¶
func (spec *DeviceConfigSpecSpec) UnmarshalProto(protoBytes []byte) error
UnmarshalProto implements protobuf.ResourceUnmarshaler.
type HardwareAddr ¶
type HardwareAddr = typed.Resource[HardwareAddrSpec, HardwareAddrRD]
HardwareAddr resource describes hardware address of the physical links.
func NewHardwareAddr ¶
func NewHardwareAddr(namespace resource.Namespace, id resource.ID) *HardwareAddr
NewHardwareAddr initializes a HardwareAddr resource.
type HardwareAddrRD ¶
type HardwareAddrRD struct{}
HardwareAddrRD provides auxiliary methods for HardwareAddr.
func (HardwareAddrRD) ResourceDefinition ¶
func (HardwareAddrRD) ResourceDefinition(resource.Metadata, HardwareAddrSpec) meta.ResourceDefinitionSpec
ResourceDefinition implements typed.ResourceDefinition interface.
type HardwareAddrSpec ¶
type HardwareAddrSpec struct { // Name defines link name Name string `yaml:"name" protobuf:"1"` // Hardware address HardwareAddr nethelpers.HardwareAddr `yaml:"hardwareAddr" protobuf:"2"` }
HardwareAddrSpec describes spec for the link.
func (HardwareAddrSpec) DeepCopy ¶
func (o HardwareAddrSpec) DeepCopy() HardwareAddrSpec
DeepCopy generates a deep copy of HardwareAddrSpec.
type HostnameSpec ¶
type HostnameSpec = typed.Resource[HostnameSpecSpec, HostnameSpecRD]
HostnameSpec resource holds node hostname.
func NewHostnameSpec ¶
func NewHostnameSpec(namespace resource.Namespace, id resource.ID) *HostnameSpec
NewHostnameSpec initializes a HostnameSpec resource.
type HostnameSpecRD ¶
type HostnameSpecRD struct{}
HostnameSpecRD provides auxiliary methods for HostnameSpec.
func (HostnameSpecRD) ResourceDefinition ¶
func (HostnameSpecRD) ResourceDefinition(resource.Metadata, HostnameSpecSpec) meta.ResourceDefinitionSpec
ResourceDefinition implements typed.ResourceDefinition interface.
type HostnameSpecSpec ¶
type HostnameSpecSpec struct { Hostname string `yaml:"hostname" protobuf:"1"` Domainname string `yaml:"domainname" protobuf:"2"` ConfigLayer ConfigLayer `yaml:"layer" protobuf:"3"` }
HostnameSpecSpec describes node nostname.
func (HostnameSpecSpec) DeepCopy ¶
func (o HostnameSpecSpec) DeepCopy() HostnameSpecSpec
DeepCopy generates a deep copy of HostnameSpecSpec.
func (*HostnameSpecSpec) FQDN ¶
func (spec *HostnameSpecSpec) FQDN() string
FQDN returns the fully-qualified domain name.
func (*HostnameSpecSpec) ParseFQDN ¶
func (spec *HostnameSpecSpec) ParseFQDN(fqdn string) error
ParseFQDN into parts and validate it.
func (*HostnameSpecSpec) Validate ¶
func (spec *HostnameSpecSpec) Validate() error
Validate the hostname.
type HostnameStatus ¶
type HostnameStatus = typed.Resource[HostnameStatusSpec, HostnameStatusRD]
HostnameStatus resource holds node hostname.
func NewHostnameStatus ¶
func NewHostnameStatus(namespace resource.Namespace, id resource.ID) *HostnameStatus
NewHostnameStatus initializes a HostnameStatus resource.
type HostnameStatusRD ¶
type HostnameStatusRD struct{}
HostnameStatusRD provides auxiliary methods for HostnameStatus.
func (HostnameStatusRD) ResourceDefinition ¶
func (HostnameStatusRD) ResourceDefinition(resource.Metadata, HostnameStatusSpec) meta.ResourceDefinitionSpec
ResourceDefinition implements typed.ResourceDefinition interface.
type HostnameStatusSpec ¶
type HostnameStatusSpec struct { Hostname string `yaml:"hostname" protobuf:"1"` Domainname string `yaml:"domainname" protobuf:"2"` }
HostnameStatusSpec describes node nostname.
func (*HostnameStatusSpec) DNSNames ¶
func (spec *HostnameStatusSpec) DNSNames() []string
DNSNames returns DNS names to be added to the certificate based on the hostname and fqdn.
func (HostnameStatusSpec) DeepCopy ¶
func (o HostnameStatusSpec) DeepCopy() HostnameStatusSpec
DeepCopy generates a deep copy of HostnameStatusSpec.
func (*HostnameStatusSpec) FQDN ¶
func (spec *HostnameStatusSpec) FQDN() string
FQDN returns the fully-qualified domain name.
type LinkRefresh ¶
type LinkRefresh = typed.Resource[LinkRefreshSpec, LinkRefreshRD]
LinkRefresh resource is used to communicate link changes which can't be subscribed to via netlink.
The only usecase for now is the Wireguards, as there's no way subscribe to wireguard updates via the netlink API.
Whenever Wireguard interface is updated, LinkRefresh resource is modified to trigger a reconcile loop in the LinkStatusController.
func NewLinkRefresh ¶
func NewLinkRefresh(namespace resource.Namespace, id resource.ID) *LinkRefresh
NewLinkRefresh initializes a LinkRefresh resource.
type LinkRefreshRD ¶
type LinkRefreshRD struct{}
LinkRefreshRD provides auxiliary methods for LinkRefresh.
func (LinkRefreshRD) ResourceDefinition ¶
func (LinkRefreshRD) ResourceDefinition(resource.Metadata, LinkRefreshSpec) meta.ResourceDefinitionSpec
ResourceDefinition implements typed.ResourceDefinition interface.
type LinkRefreshSpec ¶
type LinkRefreshSpec struct {
Generation int `yaml:"generation" protobuf:"1"`
}
LinkRefreshSpec describes status of rendered secrets.
func (LinkRefreshSpec) DeepCopy ¶
func (o LinkRefreshSpec) DeepCopy() LinkRefreshSpec
DeepCopy generates a deep copy of LinkRefreshSpec.
type LinkSpec ¶
type LinkSpec = typed.Resource[LinkSpecSpec, LinkSpecRD]
LinkSpec resource describes desired state of the link (network interface).
type LinkSpecRD ¶
type LinkSpecRD struct{}
LinkSpecRD provides auxiliary methods for LinkSpec.
func (LinkSpecRD) ResourceDefinition ¶
func (LinkSpecRD) ResourceDefinition(resource.Metadata, LinkSpecSpec) meta.ResourceDefinitionSpec
ResourceDefinition implements typed.ResourceDefinition interface.
type LinkSpecSpec ¶
type LinkSpecSpec struct { // Name defines link name Name string `yaml:"name" protobuf:"1"` // Logical describes if the interface should be created on the fly if it doesn't exist. Logical bool `yaml:"logical" protobuf:"2"` // If Up is true, bring interface up, otherwise bring interface down. // // TODO: make *bool ? Up bool `yaml:"up" protobuf:"3"` // Interface MTU (always applies). MTU uint32 `yaml:"mtu" protobuf:"4"` // Kind and Type are only required for Logical interfaces. Kind string `yaml:"kind" protobuf:"5"` Type nethelpers.LinkType `yaml:"type" protobuf:"6"` // ParentName indicates link parent for VLAN interfaces. ParentName string `yaml:"parentName,omitempty" protobuf:"7"` // MasterName indicates master link for enslaved bonded interfaces. BondSlave BondSlave `yaml:",omitempty,inline" protobuf:"8"` // BridgeSlave indicates master link for bridged interfaces. BridgeSlave BridgeSlave `yaml:"bridgeSlave,omitempty" protobuf:"9"` // These structures are present depending on "Kind" for Logical interfaces. VLAN VLANSpec `yaml:"vlan,omitempty" protobuf:"10"` BondMaster BondMasterSpec `yaml:"bondMaster,omitempty" protobuf:"11"` BridgeMaster BridgeMasterSpec `yaml:"bridgeMaster,omitempty" protobuf:"12"` Wireguard WireguardSpec `yaml:"wireguard,omitempty" protobuf:"13"` // Configuration layer. ConfigLayer ConfigLayer `yaml:"layer" protobuf:"14"` }
LinkSpecSpec describes spec for the link.
func (LinkSpecSpec) DeepCopy ¶
func (o LinkSpecSpec) DeepCopy() LinkSpecSpec
DeepCopy generates a deep copy of LinkSpecSpec.
func (*LinkSpecSpec) Merge ¶
func (spec *LinkSpecSpec) Merge(other *LinkSpecSpec) error
Merge with other, overwriting fields from other if set.
type LinkStatus ¶
type LinkStatus = typed.Resource[LinkStatusSpec, LinkStatusRD]
LinkStatus resource holds physical network link status.
func NewLinkStatus ¶
func NewLinkStatus(namespace resource.Namespace, id resource.ID) *LinkStatus
NewLinkStatus initializes a LinkStatus resource.
type LinkStatusRD ¶
type LinkStatusRD struct{}
LinkStatusRD provides auxiliary methods for LinkStatus.
func (LinkStatusRD) ResourceDefinition ¶
func (LinkStatusRD) ResourceDefinition(resource.Metadata, LinkStatusSpec) meta.ResourceDefinitionSpec
ResourceDefinition implements typed.ResourceDefinition interface.
type LinkStatusSpec ¶
type LinkStatusSpec struct { // Fields coming from rtnetlink API. Index uint32 `yaml:"index" protobuf:"1"` Type nethelpers.LinkType `yaml:"type" protobuf:"2"` LinkIndex uint32 `yaml:"linkIndex" protobuf:"3"` Flags nethelpers.LinkFlags `yaml:"flags" protobuf:"4"` HardwareAddr nethelpers.HardwareAddr `yaml:"hardwareAddr" protobuf:"5"` PermanentAddr nethelpers.HardwareAddr `yaml:"permanentAddr" protobuf:"30"` BroadcastAddr nethelpers.HardwareAddr `yaml:"broadcastAddr" protobuf:"6"` MTU uint32 `yaml:"mtu" protobuf:"7"` QueueDisc string `yaml:"queueDisc" protobuf:"8"` MasterIndex uint32 `yaml:"masterIndex,omitempty" protobuf:"9"` OperationalState nethelpers.OperationalState `yaml:"operationalState" protobuf:"10"` Kind string `yaml:"kind" protobuf:"11"` SlaveKind string `yaml:"slaveKind" protobuf:"12"` BusPath string `yaml:"busPath,omitempty" protobuf:"13"` PCIID string `yaml:"pciID,omitempty" protobuf:"14"` Driver string `yaml:"driver,omitempty" protobuf:"15"` DriverVersion string `yaml:"driverVersion,omitempty" protobuf:"16"` FirmwareVersion string `yaml:"firmwareVersion,omitempty" protobuf:"17"` ProductID string `yaml:"productID,omitempty" protobuf:"18"` VendorID string `yaml:"vendorID,omitempty" protobuf:"19"` Product string `yaml:"product,omitempty" protobuf:"20"` Vendor string `yaml:"vendor,omitempty" protobuf:"21"` // Fields coming from ethtool API. LinkState bool `yaml:"linkState" protobuf:"22"` SpeedMegabits int `yaml:"speedMbit,omitempty" protobuf:"23"` Port nethelpers.Port `yaml:"port" protobuf:"24"` Duplex nethelpers.Duplex `yaml:"duplex" protobuf:"25"` // Following fields are only populated with respective Kind. VLAN VLANSpec `yaml:"vlan,omitempty" protobuf:"26"` BridgeMaster BridgeMasterSpec `yaml:"bridgeMaster,omitempty" protobuf:"27"` BondMaster BondMasterSpec `yaml:"bondMaster,omitempty" protobuf:"28"` Wireguard WireguardSpec `yaml:"wireguard,omitempty" protobuf:"29"` }
LinkStatusSpec describes status of rendered secrets.
func (LinkStatusSpec) DeepCopy ¶
func (o LinkStatusSpec) DeepCopy() LinkStatusSpec
DeepCopy generates a deep copy of LinkStatusSpec.
func (LinkStatusSpec) Physical ¶
func (s LinkStatusSpec) Physical() bool
Physical checks if the link is physical ethernet.
type NodeAddress ¶
type NodeAddress = typed.Resource[NodeAddressSpec, NodeAddressRD]
NodeAddress resource holds physical network link status.
func NewNodeAddress ¶
func NewNodeAddress(namespace resource.Namespace, id resource.ID) *NodeAddress
NewNodeAddress initializes a NodeAddress resource.
type NodeAddressFilter ¶
type NodeAddressFilter = typed.Resource[NodeAddressFilterSpec, NodeAddressFilterRD]
NodeAddressFilter resource holds filter for NodeAddress resources.
func NewNodeAddressFilter ¶
func NewNodeAddressFilter(namespace resource.Namespace, id resource.ID) *NodeAddressFilter
NewNodeAddressFilter initializes a NodeAddressFilter resource.
type NodeAddressFilterRD ¶
type NodeAddressFilterRD struct{}
NodeAddressFilterRD provides auxiliary methods for NodeAddressFilter.
func (NodeAddressFilterRD) ResourceDefinition ¶
func (NodeAddressFilterRD) ResourceDefinition(resource.Metadata, NodeAddressFilterSpec) meta.ResourceDefinitionSpec
ResourceDefinition implements typed.ResourceDefinition interface.
type NodeAddressFilterSpec ¶
type NodeAddressFilterSpec struct { // Address is skipped if it doesn't match any of the includeSubnets (if includeSubnets is not empty). IncludeSubnets []netip.Prefix `yaml:"includeSubnets" protobuf:"1"` // Address is skipped if it matches any of the includeSubnets. ExcludeSubnets []netip.Prefix `yaml:"excludeSubnets" protobuf:"2"` }
NodeAddressFilterSpec describes a filter for NodeAddresses.
func (NodeAddressFilterSpec) DeepCopy ¶
func (o NodeAddressFilterSpec) DeepCopy() NodeAddressFilterSpec
DeepCopy generates a deep copy of NodeAddressFilterSpec.
type NodeAddressRD ¶
type NodeAddressRD struct{}
NodeAddressRD provides auxiliary methods for NodeAddress.
func (NodeAddressRD) ResourceDefinition ¶
func (NodeAddressRD) ResourceDefinition(resource.Metadata, NodeAddressSpec) meta.ResourceDefinitionSpec
ResourceDefinition implements typed.ResourceDefinition interface.
type NodeAddressSpec ¶
NodeAddressSpec describes a set of node addresses.
func (NodeAddressSpec) DeepCopy ¶
func (o NodeAddressSpec) DeepCopy() NodeAddressSpec
DeepCopy generates a deep copy of NodeAddressSpec.
func (*NodeAddressSpec) IPs ¶
func (spec *NodeAddressSpec) IPs() []netip.Addr
IPs returns IP without prefix.
type Operator ¶
type Operator int
Operator enumerates Talos network operators.
Operator list.
func OperatorString ¶
OperatorString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.
func OperatorValues ¶
func OperatorValues() []Operator
OperatorValues returns all values of the enum
func (Operator) IsAOperator ¶
IsAOperator returns "true" if the value is listed in the enum definition. "false" otherwise
func (Operator) MarshalText ¶
MarshalText implements the encoding.TextMarshaler interface for Operator
func (*Operator) UnmarshalText ¶
UnmarshalText implements the encoding.TextUnmarshaler interface for Operator
type OperatorSpec ¶
type OperatorSpec = typed.Resource[OperatorSpecSpec, OperatorSpecRD]
OperatorSpec resource holds DNS resolver info.
func NewOperatorSpec ¶
func NewOperatorSpec(namespace resource.Namespace, id resource.ID) *OperatorSpec
NewOperatorSpec initializes a OperatorSpec resource.
type OperatorSpecRD ¶
type OperatorSpecRD struct{}
OperatorSpecRD provides auxiliary methods for OperatorSpec.
func (OperatorSpecRD) ResourceDefinition ¶
func (OperatorSpecRD) ResourceDefinition(resource.Metadata, OperatorSpecSpec) meta.ResourceDefinitionSpec
ResourceDefinition implements typed.ResourceDefinition interface.
type OperatorSpecSpec ¶
type OperatorSpecSpec struct { Operator Operator `yaml:"operator" protobuf:"1"` LinkName string `yaml:"linkName" protobuf:"2"` RequireUp bool `yaml:"requireUp" protobuf:"3"` DHCP4 DHCP4OperatorSpec `yaml:"dhcp4,omitempty" protobuf:"4"` DHCP6 DHCP6OperatorSpec `yaml:"dhcp6,omitempty" protobuf:"5"` VIP VIPOperatorSpec `yaml:"vip,omitempty" protobuf:"6"` ConfigLayer ConfigLayer `yaml:"layer" protobuf:"7"` }
OperatorSpecSpec describes DNS resolvers.
func (OperatorSpecSpec) DeepCopy ¶
func (o OperatorSpecSpec) DeepCopy() OperatorSpecSpec
DeepCopy generates a deep copy of OperatorSpecSpec.
type ReadyCondition ¶
type ReadyCondition struct {
// contains filtered or unexported fields
}
ReadyCondition implements condition which waits for the network to be ready.
func NewReadyCondition ¶
func NewReadyCondition(state state.State, checks ...StatusCheck) *ReadyCondition
NewReadyCondition builds a coondition which waits for the network to be ready.
func (*ReadyCondition) String ¶
func (condition *ReadyCondition) String() string
type ResolverSpec ¶
type ResolverSpec = typed.Resource[ResolverSpecSpec, ResolverSpecRD]
ResolverSpec resource holds DNS resolver info.
func NewResolverSpec ¶
func NewResolverSpec(namespace resource.Namespace, id resource.ID) *ResolverSpec
NewResolverSpec initializes a ResolverSpec resource.
type ResolverSpecRD ¶
type ResolverSpecRD struct{}
ResolverSpecRD provides auxiliary methods for ResolverSpec.
func (ResolverSpecRD) ResourceDefinition ¶
func (ResolverSpecRD) ResourceDefinition(resource.Metadata, ResolverSpecSpec) meta.ResourceDefinitionSpec
ResourceDefinition implements typed.ResourceDefinition interface.
type ResolverSpecSpec ¶
type ResolverSpecSpec struct { DNSServers []netip.Addr `yaml:"dnsServers" protobuf:"1"` ConfigLayer ConfigLayer `yaml:"layer" protobuf:"2"` }
ResolverSpecSpec describes DNS resolvers.
func (ResolverSpecSpec) DeepCopy ¶
func (o ResolverSpecSpec) DeepCopy() ResolverSpecSpec
DeepCopy generates a deep copy of ResolverSpecSpec.
type ResolverStatus ¶
type ResolverStatus = typed.Resource[ResolverStatusSpec, ResolverStatusRD]
ResolverStatus resource holds DNS resolver info.
func NewResolverStatus ¶
func NewResolverStatus(namespace resource.Namespace, id resource.ID) *ResolverStatus
NewResolverStatus initializes a ResolverStatus resource.
type ResolverStatusRD ¶
type ResolverStatusRD struct{}
ResolverStatusRD provides auxiliary methods for ResolverStatus.
func (ResolverStatusRD) ResourceDefinition ¶
func (ResolverStatusRD) ResourceDefinition(resource.Metadata, ResolverStatusSpec) meta.ResourceDefinitionSpec
ResourceDefinition implements typed.ResourceDefinition interface.
type ResolverStatusSpec ¶
ResolverStatusSpec describes DNS resolvers.
func (ResolverStatusSpec) DeepCopy ¶
func (o ResolverStatusSpec) DeepCopy() ResolverStatusSpec
DeepCopy generates a deep copy of ResolverStatusSpec.
type RouteSpec ¶
type RouteSpec = typed.Resource[RouteSpecSpec, RouteSpecRD]
RouteSpec resource holds route specification to be applied to the kernel.
type RouteSpecRD ¶
type RouteSpecRD struct{}
RouteSpecRD provides auxiliary methods for RouteSpec.
func (RouteSpecRD) ResourceDefinition ¶
func (RouteSpecRD) ResourceDefinition(resource.Metadata, RouteSpecSpec) meta.ResourceDefinitionSpec
ResourceDefinition implements typed.ResourceDefinition interface.
type RouteSpecSpec ¶
type RouteSpecSpec struct { Family nethelpers.Family `yaml:"family" protobuf:"1"` Destination netip.Prefix `yaml:"dst" protobuf:"2"` Source netip.Addr `yaml:"src" protobuf:"3"` Gateway netip.Addr `yaml:"gateway" protobuf:"4"` OutLinkName string `yaml:"outLinkName,omitempty" protobuf:"5"` Table nethelpers.RoutingTable `yaml:"table" protobuf:"6"` Priority uint32 `yaml:"priority,omitempty" protobuf:"7"` Scope nethelpers.Scope `yaml:"scope" protobuf:"8"` Type nethelpers.RouteType `yaml:"type" protobuf:"9"` Flags nethelpers.RouteFlags `yaml:"flags" protobuf:"10"` Protocol nethelpers.RouteProtocol `yaml:"protocol" protobuf:"11"` ConfigLayer ConfigLayer `yaml:"layer" protobuf:"12"` MTU uint32 `yaml:"mtu,omitempty" protobuf:"13"` }
RouteSpecSpec describes the route.
func (RouteSpecSpec) DeepCopy ¶
func (o RouteSpecSpec) DeepCopy() RouteSpecSpec
DeepCopy generates a deep copy of RouteSpecSpec.
func (*RouteSpecSpec) Normalize ¶
func (route *RouteSpecSpec) Normalize()
Normalize converts 0.0.0.0 to zero value.
type RouteStatus ¶
type RouteStatus = typed.Resource[RouteStatusSpec, RouteStatusRD]
RouteStatus resource holds physical network link status.
func NewRouteStatus ¶
func NewRouteStatus(namespace resource.Namespace, id resource.ID) *RouteStatus
NewRouteStatus initializes a RouteStatus resource.
type RouteStatusRD ¶
type RouteStatusRD struct{}
RouteStatusRD provides auxiliary methods for RouteStatus.
func (RouteStatusRD) ResourceDefinition ¶
func (RouteStatusRD) ResourceDefinition(resource.Metadata, RouteStatusSpec) meta.ResourceDefinitionSpec
ResourceDefinition implements typed.ResourceDefinition interface.
type RouteStatusSpec ¶
type RouteStatusSpec struct { Family nethelpers.Family `yaml:"family" protobuf:"1"` Destination netip.Prefix `yaml:"dst" protobuf:"2"` Source netip.Addr `yaml:"src" protobuf:"3"` Gateway netip.Addr `yaml:"gateway" protobuf:"4"` OutLinkIndex uint32 `yaml:"outLinkIndex,omitempty" protobuf:"5"` OutLinkName string `yaml:"outLinkName,omitempty" protobuf:"6"` Table nethelpers.RoutingTable `yaml:"table" protobuf:"7"` Priority uint32 `yaml:"priority" protobuf:"8"` Scope nethelpers.Scope `yaml:"scope" protobuf:"9"` Type nethelpers.RouteType `yaml:"type" protobuf:"10"` Flags nethelpers.RouteFlags `yaml:"flags" protobuf:"11"` Protocol nethelpers.RouteProtocol `yaml:"protocol" protobuf:"12"` MTU uint32 `yaml:"mtu,omitempty" protobuf:"13"` }
RouteStatusSpec describes status of rendered secrets.
func (RouteStatusSpec) DeepCopy ¶
func (o RouteStatusSpec) DeepCopy() RouteStatusSpec
DeepCopy generates a deep copy of RouteStatusSpec.
type STPSpec ¶
type STPSpec struct {
Enabled bool `yaml:"enabled" protobuf:"1"`
}
STPSpec describes Spanning Tree Protocol (STP) settings of a bridge.
type Status ¶
type Status = typed.Resource[StatusSpec, StatusRD]
Status resource holds status of networking setup.
type StatusCheck ¶
type StatusCheck func(*StatusSpec) bool
StatusCheck asserts specific part of Status to be true.
func StatusChecksFromStatuses ¶
func StatusChecksFromStatuses(statuses ...nethelpers.Status) []StatusCheck
StatusChecksFromStatuses converts nethelpers.Status list into list of checks.
type StatusRD ¶
type StatusRD struct{}
StatusRD provides auxiliary methods for Status.
func (StatusRD) ResourceDefinition ¶
func (StatusRD) ResourceDefinition(resource.Metadata, StatusSpec) meta.ResourceDefinitionSpec
ResourceDefinition implements typed.ResourceDefinition interface.
type StatusSpec ¶
type StatusSpec struct { AddressReady bool `yaml:"addressReady" protobuf:"1"` ConnectivityReady bool `yaml:"connectivityReady" protobuf:"2"` HostnameReady bool `yaml:"hostnameReady" protobuf:"3"` EtcFilesReady bool `yaml:"etcFilesReady" protobuf:"4"` }
StatusSpec describes network state.
func (StatusSpec) DeepCopy ¶
func (o StatusSpec) DeepCopy() StatusSpec
DeepCopy generates a deep copy of StatusSpec.
type TimeServerSpec ¶
type TimeServerSpec = typed.Resource[TimeServerSpecSpec, TimeServerSpecRD]
TimeServerSpec resource holds NTP server info.
func NewTimeServerSpec ¶
func NewTimeServerSpec(namespace resource.Namespace, id resource.ID) *TimeServerSpec
NewTimeServerSpec initializes a TimeServerSpec resource.
type TimeServerSpecRD ¶
type TimeServerSpecRD struct{}
TimeServerSpecRD provides auxiliary methods for TimeServerSpec.
func (TimeServerSpecRD) ResourceDefinition ¶
func (TimeServerSpecRD) ResourceDefinition(resource.Metadata, TimeServerSpecSpec) meta.ResourceDefinitionSpec
ResourceDefinition implements typed.ResourceDefinition interface.
type TimeServerSpecSpec ¶
type TimeServerSpecSpec struct { NTPServers []string `yaml:"timeServers" protobuf:"1"` ConfigLayer ConfigLayer `yaml:"layer" protobuf:"2"` }
TimeServerSpecSpec describes NTP servers.
func (TimeServerSpecSpec) DeepCopy ¶
func (o TimeServerSpecSpec) DeepCopy() TimeServerSpecSpec
DeepCopy generates a deep copy of TimeServerSpecSpec.
type TimeServerStatus ¶
type TimeServerStatus = typed.Resource[TimeServerStatusSpec, TimeServerStatusRD]
TimeServerStatus resource holds NTP server info.
func NewTimeServerStatus ¶
func NewTimeServerStatus(namespace resource.Namespace, id resource.ID) *TimeServerStatus
NewTimeServerStatus initializes a TimeServerStatus resource.
type TimeServerStatusRD ¶
type TimeServerStatusRD struct{}
TimeServerStatusRD provides auxiliary methods for TimeServerStatus.
func (TimeServerStatusRD) ResourceDefinition ¶
func (TimeServerStatusRD) ResourceDefinition(resource.Metadata, TimeServerStatusSpec) meta.ResourceDefinitionSpec
ResourceDefinition implements typed.ResourceDefinition interface.
type TimeServerStatusSpec ¶
type TimeServerStatusSpec struct {
NTPServers []string `yaml:"timeServers" protobuf:"1"`
}
TimeServerStatusSpec describes NTP servers.
func (TimeServerStatusSpec) DeepCopy ¶
func (o TimeServerStatusSpec) DeepCopy() TimeServerStatusSpec
DeepCopy generates a deep copy of TimeServerStatusSpec.
type ULAPurpose ¶
type ULAPurpose byte
ULAPurpose is the Unique Local Addressing key for the Talos-specific purpose of the prefix.
type VIPEquinixMetalSpec ¶
type VIPEquinixMetalSpec struct { ProjectID string `yaml:"projectID" protobuf:"1"` DeviceID string `yaml:"deviceID" protobuf:"2"` APIToken string `yaml:"apiToken" protobuf:"3"` }
VIPEquinixMetalSpec describes virtual (elastic) IP settings for Equinix Metal.
type VIPHCloudSpec ¶
type VIPHCloudSpec struct { DeviceID int `yaml:"deviceID" protobuf:"1"` NetworkID int `yaml:"networkID" protobuf:"2"` APIToken string `yaml:"apiToken" protobuf:"3"` }
VIPHCloudSpec describes virtual (elastic) IP settings for Hetzner Cloud.
type VIPOperatorSpec ¶
type VIPOperatorSpec struct { IP netip.Addr `yaml:"ip" protobuf:"1"` GratuitousARP bool `yaml:"gratuitousARP" protobuf:"2"` EquinixMetal VIPEquinixMetalSpec `yaml:"equinixMetal,omitempty" protobuf:"3"` HCloud VIPHCloudSpec `yaml:"hcloud,omitempty" protobuf:"4"` }
VIPOperatorSpec describes virtual IP operator options.
type VLANSpec ¶
type VLANSpec struct { // VID is the vlan ID. VID uint16 `yaml:"vlanID" protobuf:"1"` // Protocol is the vlan protocol. Protocol nethelpers.VLANProtocol `yaml:"vlanProtocol" protobuf:"2"` }
VLANSpec describes VLAN settings if Kind == "vlan".
type WireguardPeer ¶
type WireguardPeer struct { PublicKey string `yaml:"publicKey" protobuf:"1"` Endpoint string `yaml:"endpoint" protobuf:"3"` PersistentKeepaliveInterval time.Duration `yaml:"persistentKeepaliveInterval" protobuf:"4"` AllowedIPs []netip.Prefix `yaml:"allowedIPs" protobuf:"5"` }
WireguardPeer describes a single peer.
func (*WireguardPeer) Equal ¶
func (peer *WireguardPeer) Equal(other *WireguardPeer) bool
Equal checks two WireguardPeer structs for equality.
`spec` is considered to be the result of getting current Wireguard configuration, while `other` is the new (updated configuration).
type WireguardSpec ¶
type WireguardSpec struct { // PrivateKey is used to configure the link, present only in the LinkSpec. PrivateKey string `yaml:"privateKey,omitempty" protobuf:"1"` // PublicKey is only used in LinkStatus to show the link status. PublicKey string `yaml:"publicKey,omitempty" protobuf:"2"` ListenPort int `yaml:"listenPort" protobuf:"3"` FirewallMark int `yaml:"firewallMark" protobuf:"4"` Peers []WireguardPeer `yaml:"peers" protobuf:"5"` }
WireguardSpec describes Wireguard settings if Kind == "wireguard".
func (*WireguardSpec) Equal ¶
func (spec *WireguardSpec) Equal(other *WireguardSpec) bool
Equal checks two WireguardSpecs for equality.
Both specs should be sorted before calling this method.
`spec` is considered to be the result of getting current Wireguard configuration, while `other` is the new (updated configuration).
func (*WireguardSpec) IsZero ¶
func (spec *WireguardSpec) IsZero() bool
IsZero checks if the WireguardSpec is zero value.
func (*WireguardSpec) Merge ¶
func (spec *WireguardSpec) Merge(other WireguardSpec)
Merge with other Wireguard spec overwriting non-zero values.
func (*WireguardSpec) Sort ¶
func (spec *WireguardSpec) Sort()
Sort the spec so that comparison is possible.
Source Files ¶
- address_spec.go
- address_status.go
- condition.go
- configlayer.go
- configlayer_enumer.go
- deep_copy.generated.go
- device_config_spec.go
- hardrware_addr.go
- hostname_spec.go
- hostname_status.go
- link.go
- link_refresh.go
- link_spec.go
- link_status.go
- network.go
- node_address.go
- node_address_filter.go
- operator.go
- operator_enumer.go
- operator_spec.go
- resolver_spec.go
- resolver_status.go
- route_spec.go
- route_status.go
- status.go
- timeserver_spec.go
- timeserver_status.go
- ula.go