nscale

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: May 14, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NAME = "nscale"
)
View Source
const (
	NAME_SIM = "nscale-sim"
)

Variables

This section is empty.

Functions

func Loader

func NamedLoader

func NamedLoader() (string, providers.Loader)

func NamedLoaderSim

func NamedLoaderSim() (string, providers.Loader)

Types

type Client

type Client interface {
	Topology(context.Context, string, int, int) ([]InstanceTopology, error)
	Instances(context.Context, string) (map[string]string, error)
}

type Credentials

type Credentials struct {
	Org    string `mapstructure:"org"`
	Token  string `mapstructure:"token"`
	Region string `mapstructure:"region"`
}

type InstanceTopology

type InstanceTopology struct {
	ID          string   `json:"instance_id"`
	NetworkPath []string `json:"network_node_path"`
	BlockID     *string  `json:"block_id,omitempty"`
}

InstanceTopology represents the topology of a single instance.

type Provider

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

func (*Provider) GenerateTopologyConfig

func (p *Provider) GenerateTopologyConfig(ctx context.Context, pageSize *int, instances []topology.ComputeInstances) (*topology.Graph, *httperr.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

type ProviderParams

type ProviderParams struct {
	RadarApiUrl    string `mapstructure:"radarApiUrl"`
	InstanceAPIUrl string `mapstructure:"instanceApiUrl"`
	TrimTiers      int    `mapstructure:"trimTiers"`
}

type TopologyResult

type TopologyResult struct {
	Instances []InstanceTopology `json:"results"`
}

TopologyResult represents the topology of a single instance.

Jump to

Keyboard shortcuts

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