status

package
v0.0.0-...-b0bff92 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2021 License: AGPL-3.0 Imports: 42 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatMachineTabular

func FormatMachineTabular(writer io.Writer, forceColor bool, value interface{}) error

FormatMachineTabular writes a tabular summary of machine

func FormatOneline

func FormatOneline(writer io.Writer, value interface{}) error

FormatOneline writes a brief list of units and their subordinates. Subordinates will be indented 2 spaces and listed under their superiors. This format works with version 2 of the CLI.

func FormatSummary

func FormatSummary(writer io.Writer, value interface{}) error

FormatSummary writes a summary of the current environment including the following information: - Headers:

  • All subnets the environment occupies.
  • All ports the environment utilizes.

- Sections:

  • Machines: Displays total #, and then the # in each state.
  • Units: Displays total #, and then # in each state.
  • Applications: Displays total #, their names, and how many of each are exposed.
  • RemoteApplications: Displays total #, their names and URLs.

func FormatTabular

func FormatTabular(writer io.Writer, forceColor bool, value interface{}) error

FormatTabular writes a tabular summary of machines, applications, and units. Any subordinate items are indented by two spaces beneath their superior.

func NewStatusCommand

func NewStatusCommand() cmd.Command

NewStatusCommand returns a new command, which reports on the runtime state of various system entities.

func NewStatusFormatter

func NewStatusFormatter(status *params.FullStatus, isoTime bool) *statusFormatter

NewStatusFormatter takes stored model information (params.FullStatus) and populates the statusFormatter struct used in various status formatting methods

func NewStatusHistoryCommand

func NewStatusHistoryCommand() cmd.Command

NewStatusHistoryCommand returns a command that reports the history of status changes for the specified unit.

Types

type Clock

type Clock interface {
	After(time.Duration) <-chan time.Time
}

Clock defines the methods needed for the status command.

type DetailedStatus

type DetailedStatus struct {
	Status  status.Status          `yaml:"status,omitempty" json:"status,omitempty"`
	Message string                 `yaml:"message,omitempty" json:"message,omitempty"`
	Data    map[string]interface{} `yaml:"data,omitempty" json:"data,omitempty"`
	Since   *time.Time             `yaml:"since,omitempty" json:"since,omitempty"`
	Kind    status.HistoryKind     `yaml:"type,omitempty" json:"type,omitempty"`
}

DetailedStatus holds status info about a machine or unit agent.

type History

type History []DetailedStatus

History holds the status results.

type HistoryAPI

type HistoryAPI interface {
	StatusHistory(kind status.HistoryKind, tag names.Tag, filter status.StatusHistoryFilter) (status.History, error)
	BestAPIVersion() int
	Close() error
}

HistoryAPI is the API surface for the show-status-log command.

Jump to

Keyboard shortcuts

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