aliyun

package
Version: v1.0.10 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2019 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var KUBERNETES_ALICLOUD_IDENTITY = "Kubernetes.Alicloud"
View Source
var ROLE_NAME = "KubernetesMasterRole"
View Source
var TOKEN_RESYNC_PERIOD = 5 * time.Minute

Functions

func GetLocalInstanceId

func GetLocalInstanceId() (string, error)

func GetLocalRegion

func GetLocalRegion() (common.Region, error)

func GetLocalVPC

func GetLocalVPC() (string, error)

func GetLocalVswitch

func GetLocalVswitch() (string, error)

func GetLocalZone

func GetLocalZone() (string, error)

Types

type ClientMgr

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

func NewClientMgr

func NewClientMgr(key, secret string) (*ClientMgr, error)

func (*ClientMgr) MetaData

func (c *ClientMgr) MetaData() *metadata.MetaData

type ECS

type ECS interface {
	AllocateENI(vSwitch string, securityGroup string, instanceId string) (*types.ENI, error)
	GetAttachedENIs(instanceId string, containsMainENI bool) ([]*types.ENI, error)
	GetENIById(instanceId, eniId string) (*types.ENI, error)
	GetENIByMac(instanceId, mac string) (*types.ENI, error)
	FreeENI(eniId string, instanceId string) error
	GetENIIPs(eniId string) ([]net.IP, error)
	AssignIPForENI(eniId string) (net.IP, error)
	UnAssignIPForENI(eniid string, ip net.IP) error
	GetInstanceMaxENI(instanceId string) (int, error)
	GetInstanceMaxPrivateIP(intanceId string) (int, error)
	GetENIMaxIP(instanceId string, eniId string) (int, error)
}

func NewECS

func NewECS(ak, sk string, region common.Region) (ECS, error)

type ENIInfoGetter

type ENIInfoGetter interface {
	GetENIConfigByMac(mac string) (*types.ENI, error)
	GetENIConfigById(eniId string) (*types.ENI, error)
	GetENIPrivateAddresses(eniId string) ([]net.IP, error)
	GetAttachedENIs(instanceId string, containsMainENI bool) ([]*types.ENI, error)
}

type ENIMetadata

type ENIMetadata struct {
}

func (*ENIMetadata) GetAttachedENIs

func (e *ENIMetadata) GetAttachedENIs(instanceId string, containsMainENI bool) ([]*types.ENI, error)

func (*ENIMetadata) GetENIConfigById

func (e *ENIMetadata) GetENIConfigById(eniId string) (*types.ENI, error)

func (*ENIMetadata) GetENIConfigByMac

func (e *ENIMetadata) GetENIConfigByMac(mac string) (*types.ENI, error)

func (*ENIMetadata) GetENIPrivateAddresses

func (e *ENIMetadata) GetENIPrivateAddresses(eniId string) ([]net.IP, error)

type ENIOpenAPI

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

func (*ENIOpenAPI) GetAttachedENIs

func (*ENIOpenAPI) GetAttachedENIs(instanceId string, containsMainENI bool) ([]*types.ENI, error)

func (*ENIOpenAPI) GetENIConfigById

func (*ENIOpenAPI) GetENIConfigById(eniId string) (*types.ENI, error)

func (*ENIOpenAPI) GetENIConfigByMac

func (*ENIOpenAPI) GetENIConfigByMac(mac string) (*types.ENI, error)

func (*ENIOpenAPI) GetENIPrivateAddresses

func (eoa *ENIOpenAPI) GetENIPrivateAddresses(eniId string) ([]net.IP, error)

type TokenAuth

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

Jump to

Keyboard shortcuts

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