topology

package
v2.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Encoder

type Encoder interface {
	Encode(topo v1alpha1.Topology) string
}

Encoder is defined to encode a map to a unique string This encoder is designed to avoid iter all topologies in policy multiple times Assume there are M toplogies and N instances, time complexity will be optimized from O(M*N) to O(M+N)

func NewEncoder

func NewEncoder() Encoder

type Scheduler

type Scheduler interface {
	// Add adds an scheduled instance.
	// All scheduled instances should be added before calling Next()
	Add(name string, topo v1alpha1.Topology)
	// NextAdd returns available topologies of the next pending instance
	NextAdd() []v1alpha1.Topology
	// Del removes an scheduled instance.
	Del(name string)
	// NextDel returns names which can be choosed to del
	NextDel() []string
}

Scheduler defines a scheduler to choose the next topology

func New

Jump to

Keyboard shortcuts

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