formatters

package
v1.8.0-beta.0 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2024 License: MPL-2.0 Imports: 14 Imported by: 2

Documentation

Overview

Package formatters contains the API response formatters used in the CLI output.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RenderGraph

func RenderGraph(ctx context.Context, c *client.Client, resp *inspect.ControllerRuntimeDependenciesResponse, output io.Writer, withResources bool) error

RenderGraph renders inspect controller runtime graph.

func RenderMounts

func RenderMounts(resp *machine.MountsResponse, output io.Writer, remotePeer *peer.Peer) error

RenderMounts renders mounts output.

func RenderServicesInfo

func RenderServicesInfo(services []client.ServiceInfo, output io.Writer, defaultNode string, withNodeInfo bool) error

RenderServicesInfo writes human readable service information to the io.Writer.

Types

type ServiceInfoWrapper

type ServiceInfoWrapper struct {
	*machine.ServiceInfo
}

ServiceInfoWrapper helper that allows generating rich service information.

func (ServiceInfoWrapper) HealthStatus

func (svc ServiceInfoWrapper) HealthStatus() string

HealthStatus service health status.

func (ServiceInfoWrapper) LastEvent

func (svc ServiceInfoWrapper) LastEvent() string

LastEvent return last service event.

func (ServiceInfoWrapper) LastUpdated

func (svc ServiceInfoWrapper) LastUpdated() string

LastUpdated derive last updated time from events stream.

Jump to

Keyboard shortcuts

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