platformmeta

package
v0.0.0-...-a9a529d Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	FlagInstanceID         = "__cloud_instance_id__"
	FlagInstanceName       = "__cloud_instance_name__"
	FlagInstanceRegion     = "__cloud_region__"
	FlagInstanceZone       = "__cloud_zone__"
	FlagInstanceVpcID      = "__cloud_vpc_id__"
	FlagInstanceVswitchID  = "__cloud_vswitch_id__"
	FlagInstanceTags       = "__cloud_instance_tags__"
	FlagInstanceType       = "__cloud_instance_type__"
	FlagInstanceImageID    = "__cloud_image_id__"
	FlagInstanceMaxIngress = "__cloud_max_ingress__"
	FlagInstanceMaxEgress  = "__cloud_max_egress__"

	FlagInstanceNameWrapper       = "{{" + FlagInstanceName + "}}"
	FlagInstanceVpcIDWrapper      = "{{" + FlagInstanceVpcID + "}}"
	FlagInstanceVswitchIDWrapper  = "{{" + FlagInstanceVswitchID + "}}"
	FlagInstanceMaxIngressWrapper = "{{" + FlagInstanceMaxIngress + "}}"
	FlagInstanceMaxEgressWrapper  = "{{" + FlagInstanceMaxEgress + "}}"
)

Variables

View Source
var MockManagerNum int64

Functions

func AlibabaCloudEcsPlatformReadMetaVal

func AlibabaCloudEcsPlatformReadMetaVal(api string, token string) (val string, err error)

func AlibabaCloudEcsPlatformRequest

func AlibabaCloudEcsPlatformRequest(api string, method string, f func(header *http.Header)) (string, error)

Types

type Data

type Data struct {
	// contains filtered or unexported fields
}

type ECSManager

type ECSManager struct {
	// contains filtered or unexported fields
}

func (*ECSManager) GetInstanceID

func (m *ECSManager) GetInstanceID() string

func (*ECSManager) GetInstanceImageID

func (m *ECSManager) GetInstanceImageID() string

func (*ECSManager) GetInstanceMaxNetEgress

func (m *ECSManager) GetInstanceMaxNetEgress() int64

func (*ECSManager) GetInstanceMaxNetIngress

func (m *ECSManager) GetInstanceMaxNetIngress() int64

func (*ECSManager) GetInstanceName

func (m *ECSManager) GetInstanceName() string

func (*ECSManager) GetInstanceRegion

func (m *ECSManager) GetInstanceRegion() string

func (*ECSManager) GetInstanceTags

func (m *ECSManager) GetInstanceTags() map[string]string

func (*ECSManager) GetInstanceType

func (m *ECSManager) GetInstanceType() string

func (*ECSManager) GetInstanceVpcID

func (m *ECSManager) GetInstanceVpcID() string

func (*ECSManager) GetInstanceVswitchID

func (m *ECSManager) GetInstanceVswitchID() string

func (*ECSManager) GetInstanceZone

func (m *ECSManager) GetInstanceZone() string

func (*ECSManager) Ping

func (m *ECSManager) Ping() bool

func (*ECSManager) StartCollect

func (m *ECSManager) StartCollect()

type Manager

type Manager interface {
	StartCollect()
	GetInstanceID() string
	GetInstanceImageID() string
	GetInstanceType() string
	GetInstanceRegion() string
	GetInstanceZone() string
	GetInstanceName() string
	GetInstanceVpcID() string
	GetInstanceVswitchID() string
	GetInstanceMaxNetEgress() int64
	GetInstanceMaxNetIngress() int64
	GetInstanceTags() map[string]string
	Ping() bool
}

func GetManager

func GetManager(platform Platform) Manager

type MetaType

type MetaType string

type MockManager

type MockManager struct {
}

func (*MockManager) GetInstanceID

func (m *MockManager) GetInstanceID() string

func (*MockManager) GetInstanceImageID

func (m *MockManager) GetInstanceImageID() string

func (*MockManager) GetInstanceMaxNetEgress

func (m *MockManager) GetInstanceMaxNetEgress() int64

func (*MockManager) GetInstanceMaxNetIngress

func (m *MockManager) GetInstanceMaxNetIngress() int64

func (*MockManager) GetInstanceName

func (m *MockManager) GetInstanceName() string

func (*MockManager) GetInstanceRegion

func (m *MockManager) GetInstanceRegion() string

func (*MockManager) GetInstanceTags

func (m *MockManager) GetInstanceTags() map[string]string

func (*MockManager) GetInstanceType

func (m *MockManager) GetInstanceType() string

func (*MockManager) GetInstanceVpcID

func (m *MockManager) GetInstanceVpcID() string

func (*MockManager) GetInstanceVswitchID

func (m *MockManager) GetInstanceVswitchID() string

func (*MockManager) GetInstanceZone

func (m *MockManager) GetInstanceZone() string

func (*MockManager) Ping

func (m *MockManager) Ping() bool

func (*MockManager) StartCollect

func (m *MockManager) StartCollect()

type Platform

type Platform string
const (
	Aliyun Platform = "alibaba_cloud_ecs"
	Mock   Platform = "mock"
	Auto   Platform = "auto"
)

Jump to

Keyboard shortcuts

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