instance

package
v1.7.2 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Test = false

Functions

This section is empty.

Types

type Instance

type Instance struct {
	RegionID   string
	ZoneID     string
	VPCID      string
	VSwitchID  string
	PrimaryMAC string

	InstanceID   string
	InstanceType string
}

func GetInstanceMeta

func GetInstanceMeta() *Instance

type Limits

type Limits struct {
	// Adapters specifies the maximum number of interfaces that can be
	// attached to the instance
	Adapters int

	// TotalAdapters maximum number of interfaces that can be
	// attached to the instance
	TotalAdapters int

	// IPv4PerAdapter is the maximum number of ipv4 addresses per adapter/interface
	IPv4PerAdapter int

	// IPv6PerAdapter is the maximum number of ipv6 addresses per adapter/interface
	IPv6PerAdapter int

	// MemberAdapterLimit is the number interfaces that type is member
	MemberAdapterLimit int

	// MaxMemberAdapterLimit is the limit to use member
	MaxMemberAdapterLimit int

	// ERdmaAdapters specifies the maximum number of erdma interfaces
	ERdmaAdapters int

	InstanceBandwidthRx int

	InstanceBandwidthTx int
}

Limits specifies the IPAM relevant instance limits

func GetLimit

func GetLimit(client client.ECS, instanceType string) (*Limits, error)

GetLimit returns the instance limits of a particular instance type. // https://www.alibabacloud.com/help/doc-detail/25620.htm if instanceType is empty will list all instanceType and warm the cache, no error and Limits will return

func (*Limits) ERDMARes

func (l *Limits) ERDMARes() int

func (*Limits) ExclusiveENIPod

func (l *Limits) ExclusiveENIPod() int

func (*Limits) ExclusiveERDMARes

func (l *Limits) ExclusiveERDMARes() int

func (*Limits) MaximumTrunkPod

func (l *Limits) MaximumTrunkPod() int

func (*Limits) MultiIPPod

func (l *Limits) MultiIPPod() int

func (*Limits) SupportIPv6

func (l *Limits) SupportIPv6() bool

func (*Limits) SupportMultiIPIPv6

func (l *Limits) SupportMultiIPIPv6() bool

func (*Limits) TrunkPod

func (l *Limits) TrunkPod() int

Jump to

Keyboard shortcuts

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