Documentation ¶
Index ¶
- Variables
- func ConfigFromRawConfig(rawConf map[string]interface{}, dst interface{}) error
- func ExecuteOnNs(pidns int, f func()) (err error)
- func ModelFromConfig(conf map[string]interface{}) (string, error)
- func TypeFromConfig(conf map[string]interface{}) (string, error)
- type Bridger
- type DNSConf
- type IFacer
- type Model
- type ModelBridge
- type NetConf
- type Route
- type VethConf
- type Vether
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrModelNotDefined = errors.New("network model not defined")
View Source
var ErrTypeNotDefined = errors.New("interface type not defined")
Functions ¶
func ConfigFromRawConfig ¶
func ExecuteOnNs ¶
func ModelFromConfig ¶
func TypeFromConfig ¶
Types ¶
type DNSConf ¶
type DNSConf struct { Nameservers []string `json:"nameservers,omitempty"` Domain string `json:"domain,omitempty"` Search []string `json:"search,omitempty"` }
DNSConf resolvers config.
type ModelBridge ¶
type ModelBridge struct {
BrName string `json:"bridge_name"`
}
type NetConf ¶
type NetConf struct { Model map[string]interface{} `json:"model,omitempty"` LoopbackName string `json:"loopback_name,omitempty"` Interfaces []map[string]interface{} `json:"interfaces,omitempty"` DNS DNSConf `json:"dns,omitempty"` }
NetConf holds config for interfaces and DNS resolvers.
func LoadFromFile ¶
type VethConf ¶
type VethConf struct { Type string `json:"type"` Name string `json:"name"` PeerName string `json:"peer_name"` Ip string `json:"ip"` PeerIp string `json:"peer_ip"` Routes []Route `json:"routes,omitempty"` }
VethConf holds a config of a single veth pair. Ip and PeerIp holds a CIDR format IP.
Click to show internal directories.
Click to hide internal directories.