topology

package
v0.0.0-...-74102c1 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KeyEngine = "engine"

	KeyUID                    = "uid"
	KeyTopoConfigPath         = "topology_config_path"
	KeyTopoConfigmapName      = "topology_configmap_name"
	KeyTopoConfigmapNamespace = "topology_configmap_namespace"
	KeyBlockSizes             = "block_sizes"

	KeyPlugin     = "plugin"
	TopologyTree  = "topology/tree"
	TopologyBlock = "topology/block"
	NoTopology    = "no-topology"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ComputeInstances

type ComputeInstances struct {
	Region    string            `json:"region"`
	Instances map[string]string `json:"instances"` // <instance ID>:<node name> map
}

type Engine

type Engine struct {
	Name   string         `json:"name"`
	Params map[string]any `json:"params"`
}

type Provider

type Provider struct {
	Name   string            `json:"name"`
	Creds  map[string]string `json:"creds"` // access credentials
	Params map[string]any    `json:"params"`
}

type Request

type Request struct {
	Provider Provider           `json:"provider"`
	Engine   Engine             `json:"engine"`
	Nodes    []ComputeInstances `json:"nodes"`
}

func GetTopologyRequest

func GetTopologyRequest(body []byte) (*Request, error)

func NewRequest

func NewRequest(prv string, creds map[string]string, eng string, params map[string]any) *Request

func (*Request) String

func (p *Request) String() string

type Vertex

type Vertex struct {
	Name     string
	ID       string
	Vertices map[string]*Vertex
	Metadata map[string]string
}

Vertex is a tree node, representing a compute node or a network switch, where - Name is a compute node name - ID is an CSP defined instance ID of switches and compute nodes - Vertices is a list of connected compute nodes or network switches

func (*Vertex) String

func (v *Vertex) String() string

Jump to

Keyboard shortcuts

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