vswitch

package
v1.1.0-rc.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 12, 2021 License: Apache-2.0 Imports: 11 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Switch

type Switch struct {
	ID   string
	Zone string

	AvailableIPCount int64 // for ipv4
}

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(aliyun *aliyun.OpenAPI) (*SwitchPool, error)

NewSwitchPool create pool and set vSwitches to pool

func (*SwitchPool) GetByID

func (s *SwitchPool) GetByID(id string) (*Switch, error)

GetByID will get vSwitch info from local store

func (*SwitchPool) GetOne

func (s *SwitchPool) GetOne(zone string, ids sets.String) (string, error)

GetOne get one vSwitch by zone, if ids is set will limit vSwitch in this ids

func (*SwitchPool) NeedLeaderElection

func (s *SwitchPool) NeedLeaderElection() bool

NeedLeaderElection need election

func (*SwitchPool) Start

func (s *SwitchPool) Start(ctx context.Context) error

Start the controller

func (*SwitchPool) SyncSwitch

func (s *SwitchPool) SyncSwitch() error

SyncSwitch will sync all cached vSwitch info with openAPI

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL