Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RunningBuildsMonitor ¶
type RunningBuildsMonitor struct {
// contains filtered or unexported fields
}
RunningBuildsMonitor polls ListRunningBuilds every 1s and emits RunningBuildsUpdatedMsg. It tracks arrivals/departures and fetches final build status for builds that just left the running set.
Usage: call Init() from App.Init(), and pass every incoming message to HandleMsg() at the top of App.Update().
func NewRunningBuildsMonitor ¶
func NewRunningBuildsMonitor(client jenkins.JenkinsClient, store *cache.Store) *RunningBuildsMonitor
NewRunningBuildsMonitor creates a monitor. store may be nil in tests.
func (*RunningBuildsMonitor) HandleMsg ¶
HandleMsg should be called for every message in App.Update(). Returns (true, cmds) when the message is an internal monitor message and was fully consumed. The caller must not process the message further.
func (*RunningBuildsMonitor) Init ¶
func (m *RunningBuildsMonitor) Init() tea.Cmd
Init returns the first poll command. Call from App.Init().