Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SelectOption ¶ added in v1.3.0
type SelectOption interface { // Apply applies this configuration to the given select options. Apply(*SelectOptions) }
type SelectOptions ¶ added in v1.3.0
type SelectOptions struct { IgnoreZone bool VSwitchSelectPolicy SelectionPolicy }
SelectOptions contains options for requests.
func (*SelectOptions) Apply ¶ added in v1.3.0
func (o *SelectOptions) Apply(so *SelectOptions)
Apply implements SelectOption.
func (*SelectOptions) ApplyOptions ¶ added in v1.3.0
func (o *SelectOptions) ApplyOptions(opts []SelectOption) *SelectOptions
ApplyOptions applies the given select options on these options
type SelectionPolicy ¶ added in v1.3.0
type SelectionPolicy string
const ( VSwitchSelectionPolicyOrdered SelectionPolicy = "ordered" VSwitchSelectionPolicyRandom SelectionPolicy = "random" )
VSwitch Selection Policy
type Switch ¶
type Switch struct { ID string Zone string AvailableIPCount int64 // for ipv4 IPv4CIDR string IPv6CIDR string }
Switch hole all switch info from both terway config and podNetworking
type SwitchPool ¶
type SwitchPool struct {
// contains filtered or unexported fields
}
SwitchPool contain all vSwitches
func NewSwitchPool ¶
func NewSwitchPool(size int, ttl string) (*SwitchPool, error)
NewSwitchPool create pool and set vSwitches to pool
func (*SwitchPool) Add ¶ added in v1.2.1
func (s *SwitchPool) Add(sw *Switch)
Add Switch to cache. Test purpose.
func (*SwitchPool) Del ¶ added in v1.2.1
func (s *SwitchPool) Del(key string)
Del Switch from cache. Test purpose.
Click to show internal directories.
Click to hide internal directories.