Documentation
¶
Index ¶
- Variables
- func PrintActorTemplateTo(out io.Writer, template *ateapipb.ActorTemplate, format string) error
- func PrintActorTemplatesTo(out io.Writer, templates []*ateapipb.ActorTemplate, format string) error
- func PrintActorTo(out io.Writer, actor *ateapipb.Actor, format string) error
- func PrintActorsTo(out io.Writer, actors []*ateapipb.Actor, format string) error
- func PrintAtespaceTo(out io.Writer, atespace *ateapipb.Atespace, format string) error
- func PrintAtespacesTo(out io.Writer, atespaces []*ateapipb.Atespace, format string) error
- func PrintEgressPolicyTo(out io.Writer, actor string, policy *ateapipb.EgressPolicy, format string) error
- func PrintTagTo(out io.Writer, tag *ateapipb.Tag, format string) error
- func PrintTagsTo(out io.Writer, tags []*ateapipb.Tag, format string) error
- func PrintWorkerTo(out io.Writer, worker *ateapipb.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 []*ateapipb.Worker, format string) error
- func WorkerOccupancy(worker *ateapipb.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 PrintActorTemplateTo ¶ added in v0.2.0
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 ¶ added in v0.2.0
PrintActorTo prints a single actor to the provided writer.
func PrintActorsTo ¶
PrintActorsTo prints a slice of actors to the provided writer.
func PrintAtespaceTo ¶ added in v0.2.0
PrintAtespaceTo prints a single atespace to the provided writer.
func PrintAtespacesTo ¶
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
PrintTagTo prints a single tag to the provided writer.
func PrintTagsTo ¶
PrintTagsTo prints a slice of tags to the provided writer.
func PrintWorkerTo ¶ added in v0.2.0
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.