talos/pkg/resources/network/operator_string.go
Andrey Smirnov ef36849899
feat: add routes, routing rules and nftables rules for KubeSpan
This concludes basic KubeSpan implementation.

Most of the code is from #3577 with some fixes and refactoring.

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
Signed-off-by: Seán C McCord <ulexus@gmail.com>
Co-authored-by: Seán C McCord <ulexus@gmail.com>
2021-09-16 20:01:39 +03:00

26 lines
669 B
Go

// Code generated by "stringer -type=Operator -linecomment"; DO NOT EDIT.
package network
import "strconv"
func _() {
// An "invalid array index" compiler error signifies that the constant values have changed.
// Re-run the stringer command to generate them again.
var x [1]struct{}
_ = x[OperatorDHCP4-0]
_ = x[OperatorDHCP6-1]
_ = x[OperatorVIP-2]
}
const _Operator_name = "dhcp4dhcp6vip"
var _Operator_index = [...]uint8{0, 5, 10, 13}
func (i Operator) String() string {
if i < 0 || i >= Operator(len(_Operator_index)-1) {
return "Operator(" + strconv.FormatInt(int64(i), 10) + ")"
}
return _Operator_name[_Operator_index[i]:_Operator_index[i+1]]
}