Documentation
¶
Index ¶
- Constants
- func GetNodeAnnotations(ctx context.Context) (map[string]string, error)
- func Loader(ctx context.Context, cfg providers.Config) (providers.Provider, *httperr.Error)
- func LoaderSim(ctx context.Context, cfg providers.Config) (providers.Provider, *httperr.Error)
- func NamedLoader() (string, providers.Loader)
- func NamedLoaderSim() (string, providers.Loader)
- func NewSim(clientFactory ClientFactory, trimTiers int) *simProvider
- type Client
- type ClientFactory
- type Credentials
- type CredsClient
- type EC2Client
- type Provider
- func (p *Provider) GenerateTopologyConfig(ctx context.Context, pageSize *int, instances []topology.ComputeInstances) (*topology.Vertex, *httperr.Error)
- func (p *Provider) GetInstancesRegions(ctx context.Context, nodes []string) (map[string]string, error)
- func (p *Provider) Instances2NodeMap(ctx context.Context, nodes []string) (map[string]string, error)
Constants ¶
View Source
const ( IMDSURL = "http://169.254.169.254/latest" IMDSTokenURL = IMDSURL + "/api/token" IMDSInstanceURL = IMDSURL + "/meta-data/instance-id" IMDSRegionURL = IMDSURL + "/meta-data/placement/region" IMDSTokenHeaderKey = "X-aws-ec2-metadata-token-ttl-seconds" IMDSTokenHeaderVal = "60" IMDSTokenHeader = IMDSTokenHeaderKey + ": " + IMDSTokenHeaderVal IMDSHeaderKey = "X-aws-ec2-metadata-token" )
View Source
const ( NAME_SIM = "aws-sim" AvailabilityZoneKey = "availability_zone" GroupNameKey = "group" DEFAULT_MAX_RESULTS = 20 )
View Source
const NAME = "aws"
Variables ¶
This section is empty.
Functions ¶
func NamedLoader ¶
func NamedLoaderSim ¶
func NewSim ¶
func NewSim(clientFactory ClientFactory, trimTiers int) *simProvider
Types ¶
type Credentials ¶
type CredsClient ¶
type CredsClient interface {
Retrieve(ctx context.Context) (aws.Credentials, error)
}
type EC2Client ¶
type EC2Client interface {
DescribeInstanceTopology(ctx context.Context, params *ec2.DescribeInstanceTopologyInput, optFns ...func(*ec2.Options)) (*ec2.DescribeInstanceTopologyOutput, error)
}
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
func New ¶
func New(clientFactory ClientFactory, trimTiers int) *Provider
func (*Provider) GenerateTopologyConfig ¶
Click to show internal directories.
Click to hide internal directories.