topology

package
v0.0.0-...-d29d0de Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NamespacedType

type NamespacedType struct {
	Namespace string `validate:"required"`
	Type      string `validate:"required"`
}

func (NamespacedType) Compare

func (a NamespacedType) Compare(b NamespacedType) int

func (NamespacedType) String

func (nt NamespacedType) String() string

func (*NamespacedType) UnmarshalJSON

func (nt *NamespacedType) UnmarshalJSON(data []byte) error

type Node

type Node struct {
	Type  NamespacedType
	Attrs []string
}

type Topology

type Topology struct {
	graph.Graph[NamespacedType, Node]
	// contains filtered or unexported fields
}

func (*Topology) AddNode

func (t *Topology) AddNode(node Node) error

func (*Topology) GetAttrs

func (t *Topology) GetAttrs(typ NamespacedType) []string

func (*Topology) GetNamespacesForType

func (t *Topology) GetNamespacesForType(typ string) ([]string, error)

func (*Topology) ShortestPath

func (t *Topology) ShortestPath(from NamespacedType, to NamespacedType) ([]NamespacedType, error)

func (*Topology) SupportsAttr

func (t *Topology) SupportsAttr(typ NamespacedType, attr string) bool

type TopologyLoader

type TopologyLoader func() (*Topology, error)

func ReaderTopologyLoader

func ReaderTopologyLoader(readers []reader.Reader) TopologyLoader

Jump to

Keyboard shortcuts

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