Documentation ¶
Index ¶
- Constants
- func Loader(ctx context.Context, cfg providers.Config) (providers.Provider, error)
- func LoaderSim(ctx context.Context, cfg providers.Config) (providers.Provider, error)
- func NamedLoader() (string, providers.Loader)
- func NamedLoaderSim() (string, providers.Loader)
- type Client
- type ClientFactory
- type Credentials
- type CredsClient
- type EC2Client
- type IDMSClient
- type Provider
- func (p *Provider) GenerateTopologyConfig(ctx context.Context, pageSize int, instances []topology.ComputeInstances) (*topology.Vertex, error)
- func (p *Provider) GetComputeInstancesRegion() (string, error)
- func (p *Provider) GetNodeInstance(node *v1.Node) (string, error)
- func (p *Provider) GetNodeRegion(node *v1.Node) (string, error)
- func (p *Provider) Instances2NodeMap(ctx context.Context, nodes []string) (map[string]string, error)
- type SimClient
Constants ¶
View Source
const ( IMDS = "http://169.254.169.254" IMDS_TOKEN_URL = IMDS + "/latest/api/token" IMDS_URL = IMDS + "/latest/meta-data" )
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 ¶
Types ¶
type ClientFactory ¶
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 IDMSClient ¶
type IDMSClient interface {
GetRegion(ctx context.Context, params *imds.GetRegionInput, optFns ...func(*imds.Options)) (*imds.GetRegionOutput, error)
}
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
func New ¶
func New(clientFactory ClientFactory, imdsClient IDMSClient) *Provider
func (*Provider) GenerateTopologyConfig ¶
func (*Provider) GetComputeInstancesRegion ¶
GetComputeInstancesRegion implements slurm.instanceMapper
func (*Provider) GetNodeInstance ¶
GetNodeInstance implements k8s.k8sNodeInfo
func (*Provider) GetNodeRegion ¶
GetNodeRegion implements k8s.k8sNodeInfo
type SimClient ¶
type SimClient struct { Model *models.Model Outputs map[string](*[]types.InstanceTopology) NextTokens map[string]string }
func (SimClient) DescribeInstanceTopology ¶
func (client SimClient) DescribeInstanceTopology(ctx context.Context, params *ec2.DescribeInstanceTopologyInput, optFns ...func(*ec2.Options)) (*ec2.DescribeInstanceTopologyOutput, error)
Click to show internal directories.
Click to hide internal directories.