printer

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TimeNow = time.Now

TimeNow returns the current time. It is a package variable, exported so that tests in this package and in cmd can both pin it and make age rendering deterministic.

Functions

func PrintActorTemplateTo added in v0.2.0

func PrintActorTemplateTo(out io.Writer, template *ateapipb.ActorTemplate, format string) error

PrintActorTemplateTo prints a single actor template to the provided writer.

func PrintActorTemplatesTo

func PrintActorTemplatesTo(out io.Writer, templates []*ateapipb.ActorTemplate, format string) error

PrintActorTemplatesTo prints a slice of actor templates to the provided writer.

func PrintActorTo added in v0.2.0

func PrintActorTo(out io.Writer, actor *ateapipb.Actor, format string) error

PrintActorTo prints a single actor to the provided writer.

func PrintActorsTo

func PrintActorsTo(out io.Writer, actors []*ateapipb.Actor, format string) error

PrintActorsTo prints a slice of actors to the provided writer.

func PrintAtespaceTo added in v0.2.0

func PrintAtespaceTo(out io.Writer, atespace *ateapipb.Atespace, format string) error

PrintAtespaceTo prints a single atespace to the provided writer.

func PrintAtespacesTo

func PrintAtespacesTo(out io.Writer, atespaces []*ateapipb.Atespace, format string) error

PrintAtespacesTo prints a slice of atespaces to the provided writer.

func PrintEgressPolicyTo added in v0.2.0

func PrintEgressPolicyTo(out io.Writer, actor string, policy *ateapipb.EgressPolicy, format string) error

PrintEgressPolicyTo prints one actor's egress policy. json and yaml emit the bare EgressPolicy. The policy carries no actor name, so the caller passes it.

func PrintTagTo added in v0.2.0

func PrintTagTo(out io.Writer, tag *ateapipb.Tag, format string) error

PrintTagTo prints a single tag to the provided writer.

func PrintTagsTo

func PrintTagsTo(out io.Writer, tags []*ateapipb.Tag, format string) error

PrintTagsTo prints a slice of tags to the provided writer.

func PrintWorkerTo added in v0.2.0

func PrintWorkerTo(out io.Writer, worker *ateapipb.Worker, format string) error

PrintWorkerTo prints a single worker to the provided writer.

func PrintWorkerTopJSON

func PrintWorkerTopJSON(out io.Writer, items []*WorkerTopItem) error

PrintWorkerTopJSON prints worker top items as JSON.

func PrintWorkerTopTable

func PrintWorkerTopTable(out io.Writer, items []*WorkerTopItem) error

PrintWorkerTopTable prints worker top items as a formatted table.

func PrintWorkerTopTo

func PrintWorkerTopTo(out io.Writer, items []*WorkerTopItem, format string) error

PrintWorkerTopTo prints a slice of worker top items to the provided writer.

func PrintWorkerTopYAML

func PrintWorkerTopYAML(out io.Writer, items []*WorkerTopItem) error

PrintWorkerTopYAML prints worker top items as YAML.

func PrintWorkersTo

func PrintWorkersTo(out io.Writer, workers []*ateapipb.Worker, format string) error

PrintWorkersTo prints a slice of workers to the provided writer.

func WorkerOccupancy

func WorkerOccupancy(worker *ateapipb.Worker) string

WorkerOccupancy is how full a Worker is, as a count against its limit. A count rather than the Actors themselves: a listing does not carry them, and naming them all would be unreadable long before a Worker is full.

Types

type WorkerTopItem

type WorkerTopItem struct {
	Pod       string `json:"pod" yaml:"pod"`
	Pool      string `json:"pool" yaml:"pool"`
	Class     string `json:"class,omitempty" yaml:"class,omitempty"`
	Status    string `json:"status" yaml:"status"`
	CPU       string `json:"cpu" yaml:"cpu"`
	Memory    string `json:"memory" yaml:"memory"`
	Namespace string `json:"namespace,omitempty" yaml:"namespace,omitempty"`
}

WorkerTopItem represents real-time hardware resource utilization for a worker pod.

type WorkerTopList

type WorkerTopList struct {
	Workers []*WorkerTopItem `json:"workers" yaml:"workers"`
}

WorkerTopList wraps worker top items for JSON/YAML output.

Jump to

Keyboard shortcuts

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