graph

package
v0.0.0-...-075ee23 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetNamespacedName

func GetNamespacedName(clusterName, name string) string

GetNamespacedName is a shared function to get a namespaced name for a node/edge

func ReadNodeJsonGraph

func ReadNodeJsonGraph(jsonFile string) (graph.JsonGraph, string, error)

ReadNodeJsonGraph reads in the node JGF We read it in just to validate, but serialize as string

func ReadNodeJsonGraphString

func ReadNodeJsonGraphString(nodes string) (graph.JsonGraph, error)

func ValidateNodes

func ValidateNodes(nodes *jgf.JsonGraph) (int, int, error)

validateNodes ensures that we have at least one node and edge

Types

type Slot

type Slot struct {
	Name  string
	Count int32
}

A Slot for the slotlist

func ExtractResourceSlotList

func ExtractResourceSlotList(jobspec *v1.Jobspec) []Slot

ExtractResourceSlots flattens a jobspec into slots, but ordered by appearance

type SlotCount

type SlotCount struct {

	// The number of slots required
	Count int32
	Name  string

	// The number of resource submembers needed per slot
	Members int32

	// The parent of the slot
	Parent string
}

func ExtractResourceSlots

func ExtractResourceSlots(jobspec *v1.Jobspec) []SlotCount

ExtractResourceSlots flattens a jobspec into a lookup of slots

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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