cllbpriority

package
v0.24.23 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2024 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxI = 20  // e.g: max projects that use the listener
	MaxJ = 100 // e.g: max deployed instances per project
	MaxK = 20  // e.g: services per instance

)

Adjusted maximum values for i, j, and k to ensure unique encoding within the range.

Variables

View Source
var (
	// Offset where priorities start, useful if there needs to be room before.
	Offset = 1000
	// MaxEncoded value can be used to create priorities after this block.
	MaxEncoded = MaxI*baseI + MaxJ*baseJ + MaxK + Offset
)

Functions

func ListenerPriority

func ListenerPriority(i, j, k int) int

ListenerPriority will calculate a unique priority number given three integers. If values go past their max the priority will wrap around and might collide.

Types

This section is empty.

Jump to

Keyboard shortcuts

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