cloudvendor

package
v0.0.0-...-cb472e6 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2021 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(vendorName string, client VendorClient)

Register 注册云厂商客户端

Types

type VendorClient

type VendorClient interface {
	// NewVendorClient 创建云厂商客户端
	NewVendorClient(secretID, secretKey string) VendorClient
	// GetRegions 获取地域列表
	GetRegions() ([]*metadata.Region, error)
	// GetVpcs 获取vpc列表
	GetVpcs(region string, opt *ccom.VpcOpt) (*metadata.VpcsInfo, error)
	// GetInstances 获取实例列表
	GetInstances(region string, opt *ccom.InstanceOpt) (*metadata.InstancesInfo, error)
	// GetInstancesTotalCnt 获取实例总个数
	GetInstancesTotalCnt(region string, opt *ccom.InstanceOpt) (int64, error)
}

func GetVendorClient

func GetVendorClient(conf metadata.CloudAccountConf) (VendorClient, error)

GetVendorClient 获取云厂商客户端

Jump to

Keyboard shortcuts

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