Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Encoder ¶
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
Click to show internal directories.
Click to hide internal directories.