aws

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2025 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

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 GetNodeAnnotations

func GetNodeAnnotations(ctx context.Context) (map[string]string, error)

func Loader

func LoaderSim

func LoaderSim(ctx context.Context, cfg providers.Config) (providers.Provider, error)

func NamedLoader

func NamedLoader() (string, providers.Loader)

func NamedLoaderSim

func NamedLoaderSim() (string, providers.Loader)

func NewSim

func NewSim(clientFactory ClientFactory) *simProvider

Types

type Client

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

func (*Client) PageSize

func (c *Client) PageSize() *int32

type ClientFactory

type ClientFactory func(region string, pageSize *int) (*Client, error)

type Credentials

type Credentials struct {
	AccessKeyId     string
	SecretAccessKey string
	Token           string // Token is optional
}

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) *Provider

func (*Provider) GenerateTopologyConfig

func (p *Provider) GenerateTopologyConfig(ctx context.Context, pageSize *int, instances []topology.ComputeInstances) (*topology.Vertex, error)

func (*Provider) GetInstancesRegions

func (p *Provider) GetInstancesRegions(ctx context.Context, nodes []string) (map[string]string, error)

GetInstancesRegions implements slurm.instanceMapper

func (*Provider) Instances2NodeMap

func (p *Provider) Instances2NodeMap(ctx context.Context, nodes []string) (map[string]string, error)

Instances2NodeMap implements slurm.instanceMapper

Jump to

Keyboard shortcuts

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