Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Subscribe ¶
Subscribe adds the channel to the list of subscribers. Each subscriber in the list will receive broadcast events.
func Unsubscribe ¶
Unsubscribe removes the channel from the list of subscribers.
Types ¶
type Bus ¶
type Bus interface { // Publish broadcasts an event to all subscribers. Publish(*Event) // Subscribe adds the channel to the list of // subscribers. Each subscriber in the list will // receive broadcast events. Subscribe(chan *Event) // Unsubscribe removes the channel from the list // of subscribers. Unsubscribe(chan *Event) }
Bus represents an event bus implementation that allows a publisher to broadcast Event notifications to a list of subscribers.
func FromContext ¶
FromContext returns the Bus associated with this context.
type Event ¶
type Event struct { Type EventType `json:"type"` Repo model.Repo `json:"repo"` Build model.Build `json:"build"` Job model.Job `json:"job"` }
Event represents a build event.
Click to show internal directories.
Click to hide internal directories.