vpc

package
v1.19.0 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of the License is located at

http://aws.amazon.com/apache2.0/

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Code generated by go generate; DO NOT EDIT.

The regions queried were: - ap-northeast-1 - ap-northeast-2 - ap-northeast-3 - ap-south-1 - ap-southeast-1 - ap-southeast-2 - ca-central-1 - eu-central-1 - eu-north-1 - eu-west-1 - eu-west-2 - eu-west-3 - sa-east-1 - us-east-1 - us-east-2 - us-west-1 - us-west-2

Index

Constants

This section is empty.

Variables

View Source
var ErrInstanceTypeNotExist = errors.New("instance type does not exist")
View Source
var ErrNoInfo = errors.New("no info on instance type due to not being publicly available")

Functions

func GetDefaultNetworkCardIndex

func GetDefaultNetworkCardIndex(instanceType string) (int, error)

func GetENILimit

func GetENILimit(instanceType string) (int, error)

func GetHypervisorType

func GetHypervisorType(instanceType string) (string, error)

func GetIPv4Limit

func GetIPv4Limit(instanceType string) (int, error)

func GetIsBareMetal

func GetIsBareMetal(instanceType string) (bool, error)

func SetInstance

func SetInstance(instanceType string, eniLimit int, ipv4Limit int, defaultNetworkCardIndex int, networkCards []NetworkCard, hypervisorType string, isBareMetalInstance bool)

Types

type InstanceTypeLimits

type InstanceTypeLimits struct {
	ENILimit                int
	IPv4Limit               int
	DefaultNetworkCardIndex int
	NetworkCards            []NetworkCard
	HypervisorType          string
	IsBareMetal             bool
}

InstanceTypeLimits keeps track of limits for an instance type

func GetInstance

func GetInstance(instanceType string) (InstanceTypeLimits, bool)

func New

func New(eniLimit int, ipv4Limit int, defaultNetworkCardIndex int, networkCards []NetworkCard,
	hypervisorType string, isBareMetalInstance bool) InstanceTypeLimits

type NetworkCard

type NetworkCard struct {
	// max number of interfaces supported per card
	MaximumNetworkInterfaces int64
	// the index of current card
	NetworkCardIndex   int64
	NetworkPerformance string
}

func GetNetworkCards

func GetNetworkCards(instanceType string) ([]NetworkCard, error)

Jump to

Keyboard shortcuts

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