printer

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2026 License: Apache-2.0 Imports: 16 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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 PrintAccessPolicyTo

func PrintAccessPolicyTo(out io.Writer, atespace string, policy *ateapi.AccessPolicy, format string) error

PrintAccessPolicyTo prints an access policy, one table row per binding. json and yaml emit the bare AccessPolicy. The policy's metadata carries no atespace, so the caller passes it; empty means the global policy.

func PrintActorTemplateTo

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

PrintActorTemplateTo prints a single actor template to the provided writer.

func PrintActorTemplatesTo

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

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

func PrintActorTo

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

PrintActorTo prints a single actor to the provided writer.

func PrintActorsTo

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

PrintActorsTo prints a slice of actors to the provided writer.

func PrintAtespaceTo

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

PrintAtespaceTo prints a single atespace to the provided writer.

func PrintAtespacesTo

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

PrintAtespacesTo prints a slice of atespaces to the provided writer.

func PrintEgressPolicyTo

func PrintEgressPolicyTo(out io.Writer, actor string, policy *ateapi.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

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

PrintTagTo prints a single tag to the provided writer.

func PrintTagsTo

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

PrintTagsTo prints a slice of tags to the provided writer.

func PrintWorkerTo

func PrintWorkerTo(out io.Writer, worker *ateapi.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 []*ateapi.Worker, format string) error

PrintWorkersTo prints a slice of workers to the provided writer.

func WorkerOccupancy

func WorkerOccupancy(worker *ateapi.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