talos/pkg/resources/network/configlayer.go
Andrey Smirnov f010d99afb feat: implement operator framework with DHCP4 as the first example
There is nothing new in the DHCP4 operator, it's more or less adapted
code from networkd.

Other operators coming: DHCP6, VIP, WgLAN, etc.

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2021-06-09 13:12:28 -07:00

25 lines
848 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 network
//go:generate stringer -type=ConfigLayer -linecomment
// ConfigLayer describes network configuration layers, with lowest priority first.
type ConfigLayer int
// Configuration layers.
const (
ConfigDefault ConfigLayer = iota // default
ConfigCmdline // cmdline
ConfigPlatform // platform
ConfigOperator // operator
ConfigMachineConfiguration // configuration
)
// MarshalYAML implements yaml.Marshaler.
func (layer ConfigLayer) MarshalYAML() (interface{}, error) {
return layer.String(), nil
}