vswitch

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

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
	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) GetByID

func (s *SwitchPool) GetByID(ctx context.Context, client aliyun.VPCOps, id string) (*Switch, error)

GetByID will get vSwitch info from local store or openAPI

func (*SwitchPool) GetOne

func (s *SwitchPool) GetOne(ctx context.Context, client aliyun.VPCOps, zone string, ids []string) (*Switch, error)

GetOne get one vSwitch by zone and limit in ids

Jump to

Keyboard shortcuts

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