Documentation
¶
Overview ¶
package farmstatus provides a status indicator for the entire Flamenco farm.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EventBus ¶
type EventBus interface { AddListener(listener eventbus.Listener) BroadcastFarmStatusEvent(event api.EventFarmStatus) }
type PersistenceService ¶
type PersistenceService interface { SummarizeJobStatuses(ctx context.Context) (persistence.JobStatusCount, error) SummarizeWorkerStatuses(ctx context.Context) (persistence.WorkerStatusCount, error) }
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service keeps track of the overall farm status.
func NewService ¶
func NewService(persist PersistenceService, eventbus EventBus) *Service
NewService returns a 'farm status' service. Run its Run() function in a goroutine to make it actually do something.
func (*Service) OnEvent ¶
func (s *Service) OnEvent(topic eventbus.EventTopic, payload interface{})
func (*Service) Report ¶
func (s *Service) Report() api.FarmStatusReport
Report returns the last-known farm status report.
It is updated every few seconds, from the Run() function.
Click to show internal directories.
Click to hide internal directories.