Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var GlobalEventBus = NewEventBus()
GlobalEventBus is the shared event stream used by the agent.
Functions ¶
This section is empty.
Types ¶
type DeploymentEvent ¶
type DeploymentEvent struct {
Type string `json:"type"`
Deployment string `json:"deployment"`
Step string `json:"step"`
Message string `json:"message"`
Timestamp time.Time `json:"timestamp"`
DurationMilliseconds int64 `json:"duration_milliseconds,omitempty"`
JobID string `json:"job_id,omitempty"`
}
DeploymentEvent represents a real-time deployment lifecycle event.
type EventBus ¶
type EventBus struct {
// contains filtered or unexported fields
}
EventBus provides a simple in-memory publish/subscribe event system.
Later this becomes: - websocket streaming - dashboard updates - slack notifications - persistent event history
func (*EventBus) Publish ¶
func (b *EventBus) Publish( event DeploymentEvent, )
Publish sends an event to all subscribers.
func (*EventBus) Subscribe ¶
func (b *EventBus) Subscribe() chan DeploymentEvent
Subscribe registers a new event listener
Click to show internal directories.
Click to hide internal directories.