slinky

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

Documentation

Index

Constants

View Source
const (
	NAME = "slinky"

	ConfigUpdateModeNone         = "none"
	ConfigUpdateModeSkeletonOnly = "skeleton-only"
)

Variables

This section is empty.

Functions

func Loader

func Loader(_ context.Context, params engines.Config) (engines.Engine, *httperr.Error)

func NamedLoader

func NamedLoader() (string, engines.Loader)

Types

type Params

type Params struct {
	slurm.BaseParams `mapstructure:",squash"`
	// Namespace specifies the namespace where Slinky cluster is deployed
	Namespace string `mapstructure:"namespace"`
	// PodSelector specifies slurmd pods
	PodSelector metav1.LabelSelector `mapstructure:"podSelector"`
	// NodeSelector (optional) specifies nodes running slurmd pods
	NodeSelector map[string]string `mapstructure:"nodeSelector"`
	// ConfigMapName specifies the name of the configmap containing topology config
	ConfigMapName string `mapstructure:"topologyConfigmapName"`
	// ConfigPath specifies the topology config filename inside the configmap
	ConfigPath string `mapstructure:"topologyConfigPath"`
	// UseDynamicNodes specifies whether to use dynamic nodes for reporting: true or false
	UseDynamicNodes bool `mapstructure:"useDynamicNodes" default:"false"`
	// ConfigUpdateMode specifies the mode for updating the slurm config: valid values {"none", "skeleton-only"}
	ConfigUpdateMode string `mapstructure:"configUpdateMode,omitempty"`
	// Topologies specifies per-partition topology configuration
	Topologies map[string]*Topology `mapstructure:"topologies,omitempty"`
	// contains filtered or unexported fields
}

type SlinkyEngine

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

func (*SlinkyEngine) GenerateOutput

func (eng *SlinkyEngine) GenerateOutput(ctx context.Context, graph *topology.Graph, _ map[string]any) ([]byte, *httperr.Error)

func (*SlinkyEngine) GetComputeInstances

func (eng *SlinkyEngine) GetComputeInstances(ctx context.Context, _ engines.Environment) ([]topology.ComputeInstances, *httperr.Error)

func (*SlinkyEngine) UpdateTopologyConfigmap

func (eng *SlinkyEngine) UpdateTopologyConfigmap(ctx context.Context, name, namespace string, data map[string]string) error

type Topology added in v0.4.0

type Topology struct {
	slurm.Topology `mapstructure:",squash"`
	// PodSelector selects the slurmd pods belonging to this partition.
	PodSelector metav1.LabelSelector `mapstructure:"podSelector"`
}

Topology is the slinky-specific per-partition topology config. It extends slurm.Topology with PodSelector, which selects the pods whose hosts make up the partition. Exactly one of Nodes or PodSelector may be set; if neither is set, the engine falls back to "scontrol show partition".

Jump to

Keyboard shortcuts

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