Documentation
¶
Index ¶
- Variables
- func PrintAccessPolicyTo(out io.Writer, atespace string, policy *ateapi.AccessPolicy, format string) error
- func PrintActorTemplateTo(out io.Writer, template *ateapi.ActorTemplate, format string) error
- func PrintActorTemplatesTo(out io.Writer, templates []*ateapi.ActorTemplate, format string) error
- func PrintActorTo(out io.Writer, actor *ateapi.Actor, format string) error
- func PrintActorsTo(out io.Writer, actors []*ateapi.Actor, format string) error
- func PrintAtespaceTo(out io.Writer, atespace *ateapi.Atespace, format string) error
- func PrintAtespacesTo(out io.Writer, atespaces []*ateapi.Atespace, format string) error
- func PrintEgressPolicyTo(out io.Writer, actor string, policy *ateapi.EgressPolicy, format string) error
- func PrintTagTo(out io.Writer, tag *ateapi.Tag, format string) error
- func PrintTagsTo(out io.Writer, tags []*ateapi.Tag, format string) error
- func PrintWorkerTo(out io.Writer, worker *ateapi.Worker, format string) error
- func PrintWorkerTopJSON(out io.Writer, items []*WorkerTopItem) error
- func PrintWorkerTopTable(out io.Writer, items []*WorkerTopItem) error
- func PrintWorkerTopTo(out io.Writer, items []*WorkerTopItem, format string) error
- func PrintWorkerTopYAML(out io.Writer, items []*WorkerTopItem) error
- func PrintWorkersTo(out io.Writer, workers []*ateapi.Worker, format string) error
- func WorkerOccupancy(worker *ateapi.Worker) string
- type WorkerTopItem
- type WorkerTopList
Constants ¶
This section is empty.
Variables ¶
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 ¶
PrintActorTemplateTo prints a single actor template to the provided writer.
func PrintActorTemplatesTo ¶
PrintActorTemplatesTo prints a slice of actor templates to the provided writer.
func PrintActorTo ¶
PrintActorTo prints a single actor to the provided writer.
func PrintActorsTo ¶
PrintActorsTo prints a slice of actors to the provided writer.
func PrintAtespaceTo ¶
PrintAtespaceTo prints a single atespace to the provided writer.
func PrintAtespacesTo ¶
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 ¶
PrintTagTo prints a single tag to the provided writer.
func PrintTagsTo ¶
PrintTagsTo prints a slice of tags to the provided writer.
func PrintWorkerTo ¶
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 ¶
PrintWorkersTo prints a slice of workers to the provided writer.
func WorkerOccupancy ¶
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.