Documentation
¶
Index ¶
- Constants
- Variables
- func GetInterfaceIP(name string) (string, error)
- func InterfaceExists(name string) (bool, error)
- type API
- type APIInterface
- type APIInterfaceYaml
- type APIYaml
- type AuditLogging
- type AuditLoggingYaml
- type Config
- type ConfigYAML
- type DB
- type DBYaml
- type Interfaces
- type InterfacesYaml
- type Logging
- type LoggingYaml
- type N2Interface
- type N2InterfaceYaml
- type N3Interface
- type N3InterfaceYaml
- type N6Interface
- type N6InterfaceYaml
- type SystemLogging
- type SystemLoggingYaml
- type TLS
- type TLSYaml
- type Telemetry
- type TelemetryYaml
- type UPFYaml
- type XDP
- type XDPYaml
Constants ¶
View Source
const ( AttachModeNative = "native" AttachModeGeneric = "generic" )
View Source
const ( LoggingSystemOutputStdout = "stdout" LoggingSystemOutputFile = "file" )
View Source
const (
UpfNodeID = "0.0.0.0"
)
Variables ¶
View Source
var CheckInterfaceExistsFunc = func(name string) (bool, error) { networkInterface, err := net.InterfaceByName(name) if err != nil { return false, err } if networkInterface == nil { return false, nil } return true, nil }
View Source
var GetInterfaceIPFunc = func(name string) (string, error) { iface, err := net.InterfaceByName(name) if err != nil { return "", err } addresses, err := iface.Addrs() if err != nil { return "", err } for _, addr := range addresses { if ip, _, err := net.ParseCIDR(addr.String()); err == nil { if ip.To4() != nil { return ip.String(), nil } } } return "", errors.New("no valid IPv4 address found") }
Functions ¶
func GetInterfaceIP ¶ added in v0.0.7
func InterfaceExists ¶ added in v0.0.7
Types ¶
type APIInterface ¶
type APIInterfaceYaml ¶
type AuditLogging ¶ added in v0.0.8
type AuditLoggingYaml ¶ added in v0.0.8
type Config ¶
type Config struct { Logging Logging DB DB Interfaces Interfaces XDP XDP Telemetry Telemetry }
type ConfigYAML ¶
type ConfigYAML struct { Logging LoggingYaml `yaml:"logging"` DB DBYaml `yaml:"db"` Interfaces InterfacesYaml `yaml:"interfaces"` XDP XDPYaml `yaml:"xdp"` Telemetry TelemetryYaml `yaml:"telemetry"` }
type Interfaces ¶
type Interfaces struct { N2 N2Interface N3 N3Interface N6 N6Interface API APIInterface }
type InterfacesYaml ¶
type InterfacesYaml struct { N2 N2InterfaceYaml `yaml:"n2"` N3 N3InterfaceYaml `yaml:"n3"` N6 N6InterfaceYaml `yaml:"n6"` API APIInterfaceYaml `yaml:"api"` }
type Logging ¶ added in v0.0.8
type Logging struct { SystemLogging SystemLogging AuditLogging AuditLogging }
type LoggingYaml ¶ added in v0.0.8
type LoggingYaml struct { SystemLogging SystemLoggingYaml `yaml:"system"` AuditLogging AuditLoggingYaml `yaml:"audit"` }
type N2Interface ¶ added in v0.0.5
type N2InterfaceYaml ¶ added in v0.0.5
type N3Interface ¶
type N3InterfaceYaml ¶
type N3InterfaceYaml struct {
Name string `yaml:"name"`
}
type N6Interface ¶
type N6Interface struct {
Name string
}
type N6InterfaceYaml ¶
type N6InterfaceYaml struct {
Name string `yaml:"name"`
}
type SystemLogging ¶ added in v0.0.8
type SystemLoggingYaml ¶ added in v0.0.8
type TelemetryYaml ¶ added in v0.0.18
Click to show internal directories.
Click to hide internal directories.