mirror of
https://github.com/siderolabs/talos.git
synced 2025-10-22 13:01:38 +02:00
The structure of the controllers is really similar to addresses and routes: * `LinkSpec` resource describes desired link state * `LinkConfig` controller generates `LinkSpecs` based on machine configuration and kernel cmdline * `LinkMerge` controller merges multiple configuration sources into a single `LinkSpec` paying attention to the config layer priority * `LinkSpec` controller applies the specs to the kernel state Controller `LinkStatus` (which was implemented before) watches the kernel state and publishes current link status. Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
16 lines
494 B
Go
16 lines
494 B
Go
// This Source Code Form is subject to the terms of the Mozilla Public
|
|
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
package nethelpers
|
|
|
|
import "net"
|
|
|
|
// HardwareAddr wraps net.HardwareAddr for YAML marshaling.
|
|
type HardwareAddr net.HardwareAddr
|
|
|
|
// MarshalYAML implements yaml.Marshaler interface.
|
|
func (addr HardwareAddr) MarshalYAML() (interface{}, error) {
|
|
return net.HardwareAddr(addr).String(), nil
|
|
}
|