translate

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: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetBlockWithMultiIBTestSet

func GetBlockWithMultiIBTestSet() (*topology.Graph, map[string]string)

func GetTreeTestSet

func GetTreeTestSet(testForLongLabelName bool) (*topology.Graph, map[string]string)

Types

type Block

type Block struct {
	Name  string `yaml:"block"`
	Nodes string `yaml:"nodes,omitempty"`
}

type BlockTopo

type BlockTopo struct {
	BlockSizes []int    `yaml:"block_sizes"`
	Blocks     []*Block `yaml:"blocks"`
	// contains filtered or unexported fields
}

type Config

type Config struct {
	Plugin     string // topology plugin (cluster-wide)
	BlockSizes []int
	Topologies map[string]*TopologySpec // per-partiton topology settings
}

func (*Config) Validate

func (cfg *Config) Validate(graph *topology.Graph) error

type NetworkTopology

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

func NewNetworkTopology

func NewNetworkTopology(graph *topology.Graph, cfg *Config) (*NetworkTopology, error)

func (*NetworkTopology) Generate

func (nt *NetworkTopology) Generate(wr io.Writer) *httperr.Error

func (*NetworkTopology) GenerateTopologyConfig added in v0.4.0

func (nt *NetworkTopology) GenerateTopologyConfig(wr io.Writer, skeletonOnly bool) ([]*TopologyUnit, *httperr.Error)

func (*NetworkTopology) GetNodeTopologySpec added in v0.4.0

func (nt *NetworkTopology) GetNodeTopologySpec(node string, topologies []*TopologyUnit) (string, *httperr.Error)

func (*NetworkTopology) GetTopologies added in v0.4.0

func (nt *NetworkTopology) GetTopologies() ([]*TopologyUnit, *httperr.Error)

GetTopologies returns a list of TopologyUnit for all topologies defined in the config, ordered by topology name.

type Switch

type Switch struct {
	Name     string `yaml:"switch"`
	Children string `yaml:"children,omitempty"`
	Nodes    string `yaml:"nodes,omitempty"`
}

type TopologySpec

type TopologySpec struct {
	Plugin         string
	BlockSizes     []int
	ClusterDefault bool
	Nodes          []string
}

TopologySpec define topology for a partition

type TopologyUnit

type TopologyUnit struct {
	Name    string     `yaml:"topology"`
	Default bool       `yaml:"cluster_default"`
	Flat    bool       `yaml:"flat,omitempty"`
	Tree    *TreeTopo  `yaml:"tree,omitempty"`
	Block   *BlockTopo `yaml:"block,omitempty"`
}

type TreeTopo

type TreeTopo struct {
	Switches []*Switch `yaml:"switches"`
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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