Documentation
¶
Overview ¶
Package progress owns bounded, ephemeral progress feeds. Persistence and HTTP presentation belong to callers; feeds know nothing about AppTown or its database.
Index ¶
Constants ¶
const MaxLines = 500
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Feeds ¶
type Feeds struct {
// Now is the feeds' clock, for a feed's elapsed time; nil is the real
// clock.
Now func() time.Time
// contains filtered or unexported fields
}
Feeds is ready to use at its zero value. Do not copy it after first use.
func (*Feeds) Finish ¶
Finish removes the feed and returns its final tail for optional persistence. Appends after removal are ignored until another Start for the same ID.
func (*Feeds) Heartbeat ¶
Heartbeat opens a live feed for a long, output-silent step and ticks an elapsed line every few seconds, so a deploy or scan that prints nothing for 40s stops looking hung (complaint #3). The feed also carries elapsed time to the UI header and `apptown watch`; it vanishes when the returned stop func runs — ephemeral sign-of-life, never part of the ledger. Safe to stop more than once.