Documentation ¶
Overview ¶
Package progress provides data and functionality to display updates to the terminal.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ResourceMatcher ¶
ResourceMatcher is a function that returns true if the resource event matches a criteria.
type Spinner ¶
type Spinner struct {
// contains filtered or unexported fields
}
Spinner represents an indicator that an asynchronous operation is taking place.
For short operations, less than 4 seconds, display only the spinner with the Start and Stop methods. For longer operations, display intermediate progress events using the Events method.
func (*Spinner) Events ¶
Events writes additional information below the spinner while the spinner is still in progress. If there are already existing events under the spinner, it replaces them with the new information.
An event is displayed in a table, where columns are separated with the '\t' character.
type TabRow ¶
type TabRow string
TabRow represents a row in a table where columns are separated with a "\t" character.
func HumanizeResourceEvents ¶
func HumanizeResourceEvents(orderedTexts []Text, resourceEvents []deploy.ResourceEvent, matcher map[Text]ResourceMatcher, wantedCount map[Text]int) []TabRow
HumanizeResourceEvents groups raw deploy events under human-friendly tab-separated texts that can be passed into the Events() method. Every text to display starts with status in progress. For every resource event that belongs to a text, we preserve failure events if there was one. Otherwise, the text remains in progress until the expected number of resources reach the complete status.