fakeworker

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package fakeworker holds what the two programs of the benchmark fake data plane share: how a fake Worker is named and placed.

Index

Constants

View Source
const MaxRunLength = 8

MaxRunLength bounds the run prefix so every generated name stays well inside the 63-character limit on Worker names.

View Source
const WorkerPoolLabel = "ate.dev/worker-pool"

WorkerPoolLabel is the label key the WorkerPool controller selects a pool's worker pods by; a fake pool's status.selector names it the same way.

Variables

This section is empty.

Functions

func IP

func IP(index int) string

IP returns the address recorded for the index-th fake Worker of a pool: a documentation-range address that nothing answers on. Addresses repeat past 254 Workers, which ate-api-server allows.

func Index

func Index(run, namespace, pool, name string) (int, bool)

Index returns the index of the fake Worker named name in a WorkerPool, and false when the name is not one of that pool's fake Workers.

func Name

func Name(run, namespace, pool string, index int) string

Name returns the name of the index-th fake Worker of a WorkerPool. The pool enters as a hash because its namespace and name together can exceed the 63-character limit on Worker names.

func Node

func Node(index int, nodes []string) string

Node returns the node the index-th fake Worker of a pool is placed on: round robin over nodes, which the caller keeps sorted.

func PodUID

func PodUID(name string) string

PodUID returns the WorkerPodUid recorded for the Worker named name.

func Prefix

func Prefix(run string) string

Prefix is the name prefix every fake Worker of run shares.

func ValidateRun

func ValidateRun(run string) error

ValidateRun reports whether run is usable as a run prefix.

Types

This section is empty.

Jump to

Keyboard shortcuts

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