Documentation ¶
Index ¶
- func FormatMachineTabular(writer io.Writer, forceColor bool, value interface{}) error
- func FormatOneline(writer io.Writer, forceColor bool, value interface{}) error
- func FormatSummary(writer io.Writer, forceColor bool, value interface{}) error
- func FormatTabular(writer io.Writer, forceColor bool, value interface{}) error
- func NewStatusCommand() cmd.Command
- func NewStatusFormatter(p NewStatusFormatterParams) *statusFormatter
- func NewStatusHistoryCommand() cmd.Command
- type Clock
- type DetailedStatus
- type History
- type HistoryAPI
- type NewStatusFormatterParams
- type OutputWriter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatMachineTabular ¶
FormatMachineTabular writes a tabular summary of machine
func FormatOneline ¶
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 ¶
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 ¶
FormatTabular writes a tabular summary of machines, applications, and units. Any subordinate items are indented by two spaces beneath their superior.
func NewStatusCommand ¶
NewStatusCommand returns a new command, which reports on the runtime state of various system entities.
func NewStatusFormatter ¶
func NewStatusFormatter(p NewStatusFormatterParams) *statusFormatter
NewStatusFormatter returns a new status formatter used in various formatting methods.
func NewStatusHistoryCommand ¶
NewStatusHistoryCommand returns a command that reports the history of status changes for the specified unit.
Types ¶
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 HistoryAPI ¶
type HistoryAPI interface { StatusHistory(ctx stdcontext.Context, kind status.HistoryKind, tag names.Tag, filter status.StatusHistoryFilter) (status.History, error) Close() error }
HistoryAPI is the API surface for the show-status-log command.
type NewStatusFormatterParams ¶
type NewStatusFormatterParams struct { Storage *storage.CombinedStorage Status *params.FullStatus ControllerName string OutputName string ISOTime bool ShowRelations bool }
NewStatusFormatterParams contains the parameters required to be formatted for CLI output.