Documentation ¶
Index ¶
- func F(table, priority int, matches, actions string) *ovs.Flow
- func OVSFlowEqual(of0, of1 *ovs.Flow) bool
- func OVSFlowOrderMatch(of *ovs.Flow)
- func PortRangeToMasks(s, e uint16) [][2]uint16
- type FlowSet
- type FlowSource
- type Guest
- type GuestNIC
- type HostConfig
- type HostConfigNetwork
- type HostLocal
- type SecurityRule
- type SecurityRules
- type TcData
- type TcDataType
- type ZoneMan
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func OVSFlowEqual ¶
func OVSFlowOrderMatch ¶
func PortRangeToMasks ¶
Types ¶
type FlowSet ¶
type FlowSet struct {
// contains filtered or unexported fields
}
func NewFlowSet ¶
func NewFlowSet() *FlowSet
func NewFlowSetFromList ¶
type FlowSource ¶
type Guest ¶
type Guest struct { Id string Path string HostConfig *HostConfig Name string SecurityRules *SecurityRules NICs []*GuestNIC }
type GuestNIC ¶
type GuestNIC struct { Bridge string Bw int Dns string Domain string Driver string Gateway string IfnameHost string `json:"ifname"` Index int IfnameVM string `json:"interface"` IP string `json:"ip"` MAC string Masklen int Net string NetId string `json:"net_id"` Virtual bool VLAN int WireId string `json:"wire_id"` CtZoneId uint16 `json:"-"` CtZoneIdSet bool `json:"-"` PortNo int `json:"-"` }
type HostConfig ¶
type HostConfig struct { Port int ListenIfname string Networks []*HostConfigNetwork ServersPath string K8sClusterCidr *net.IPNet AllowSwitchVMs bool // allow virtual machines act as switches }
func NewHostConfig ¶
func NewHostConfig(file string) (*HostConfig, error)
func (*HostConfig) HostNetworkConfig ¶
func (hc *HostConfig) HostNetworkConfig(bridge string) *HostConfigNetwork
func (*HostConfig) MasterIPMAC ¶
func (hc *HostConfig) MasterIPMAC() (net.IP, net.HardwareAddr, error)
type HostConfigNetwork ¶
type HostConfigNetwork struct { Bridge string Ifname string IP net.IP // contains filtered or unexported fields }
func NewHostConfigNetwork ¶
func NewHostConfigNetwork(network string) (*HostConfigNetwork, error)
func (*HostConfigNetwork) IPMAC ¶
func (hcn *HostConfigNetwork) IPMAC() (net.IP, net.HardwareAddr, error)
type HostLocal ¶
type HostLocal struct { HostConfig *HostConfig Bridge string Ifname string IP net.IP MAC net.HardwareAddr MasterIP net.IP MasterMAC net.HardwareAddr }
type SecurityRule ¶
type SecurityRule struct {
// contains filtered or unexported fields
}
func NewSecurityRule ¶
func NewSecurityRule(s string) (*SecurityRule, error)
func (*SecurityRule) Direction ¶
func (sr *SecurityRule) Direction() secrules.TSecurityRuleDirection
func (*SecurityRule) IsWildMatch ¶
func (sr *SecurityRule) IsWildMatch() bool
func (*SecurityRule) OvsActionAllow ¶
func (sr *SecurityRule) OvsActionAllow() bool
func (*SecurityRule) OvsMatches ¶
func (sr *SecurityRule) OvsMatches() []string
type SecurityRules ¶
type SecurityRules struct {
// contains filtered or unexported fields
}
TODO squash neighbouring rules of the same direction
func NewSecurityRules ¶
func NewSecurityRules(s string) (*SecurityRules, error)
func (*SecurityRules) Flows ¶
func (sr *SecurityRules) Flows(data map[string]interface{}) []*ovs.Flow
func (*SecurityRules) InRulesString ¶
func (sr *SecurityRules) InRulesString() string
func (*SecurityRules) OutRulesString ¶
func (sr *SecurityRules) OutRulesString() string
type TcData ¶
type TcData struct { Type TcDataType Ifname string IngressMbps uint64 EgressMbps uint64 }
type TcDataType ¶
type TcDataType string
const ( TC_DATA_TYPE_HOSTLOCAL TcDataType = "hostlocal" TC_DATA_TYPE_GUEST TcDataType = "guest" )
type ZoneMan ¶
type ZoneMan struct {
// contains filtered or unexported fields
}
func NewZoneMan ¶
func (*ZoneMan) FreeZoneId ¶
Click to show internal directories.
Click to hide internal directories.