hierarchy

package
v0.9.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClusterQueue

type ClusterQueue[C nodeBase] struct {
	// contains filtered or unexported fields
}

func (*ClusterQueue[C]) HasParent

func (c *ClusterQueue[C]) HasParent() bool

func (*ClusterQueue[C]) Parent

func (c *ClusterQueue[C]) Parent() C

type Cohort

type Cohort[CQ, C nodeBase] struct {
	// contains filtered or unexported fields
}

func NewCohort

func NewCohort[CQ, C nodeBase]() Cohort[CQ, C]

func (*Cohort[CQ, C]) ChildCQs

func (c *Cohort[CQ, C]) ChildCQs() []CQ

func (*Cohort[CQ, C]) ChildCohorts

func (c *Cohort[CQ, C]) ChildCohorts() []C

func (*Cohort[CQ, C]) HasParent

func (c *Cohort[CQ, C]) HasParent() bool

func (*Cohort[CQ, C]) Parent

func (c *Cohort[CQ, C]) Parent() C

type CycleCheckable

type CycleCheckable interface {
	GetName() string
	HasParent() bool
	CCParent() CycleCheckable
}

type CycleChecker

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

cycleChecker checks for cycles in Cohorts, while memoizing the result.

func (*CycleChecker) HasCycle

func (c *CycleChecker) HasCycle(cohort CycleCheckable) bool

type Manager

type Manager[CQ clusterQueueNode[C], C cohortNode[CQ, C]] struct {
	Cohorts       map[string]C
	ClusterQueues map[string]CQ

	CycleChecker CycleChecker
	// contains filtered or unexported fields
}

Manager stores Cohorts and ClusterQueues, and maintains the edges between them.

func NewManager

func NewManager[CQ clusterQueueNode[C], C cohortNode[CQ, C]](newCohort func(string) C) Manager[CQ, C]

NewManager creates a new Manager. A newCohort function must be provided to instantiate Cohorts in the case that a ClusterQueue references a Cohort not backed by an API object.

func (*Manager[CQ, C]) AddClusterQueue

func (m *Manager[CQ, C]) AddClusterQueue(cq CQ)

func (*Manager[CQ, C]) AddCohort

func (m *Manager[CQ, C]) AddCohort(cohortName string)

func (*Manager[CQ, C]) DeleteClusterQueue

func (m *Manager[CQ, C]) DeleteClusterQueue(name string)

func (*Manager[CQ, C]) DeleteCohort

func (m *Manager[CQ, C]) DeleteCohort(name string)

func (*Manager[CQ, C]) UpdateClusterQueueEdge

func (m *Manager[CQ, C]) UpdateClusterQueueEdge(name, parentName string)

func (*Manager[CQ, C]) UpdateCohortEdge

func (m *Manager[CQ, C]) UpdateCohortEdge(name, parentName string)

Jump to

Keyboard shortcuts

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