Documentation
¶
Overview ¶
Package pubsub provides cluster-wide publishing and subscribing of events
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Broker ¶
Broker is a pubsub Broker implemented using postgres' listen/notify
func (Broker) Register ¶
Register a table and getter with the pubsub broker, to enable the broker to convert a database event into an OTF event.
type Event ¶
type Event struct { Type EventType Payload any Local bool // for local node only and not to be published to rest of cluster }
Event represents an event in the lifecycle of an otf resource
func NewCreatedEvent ¶
func NewDeletedEvent ¶
func NewUpdatedEvent ¶
type EventType ¶
type EventType string
EventType identifies the type of event
const ( EventError EventType = "error" EventInfo EventType = "info" EventLogChunk EventType = "log_update" EventLogFinished EventType = "log_finished" EventVCS EventType = "vcs_event" CreatedEvent EventType = "created" UpdatedEvent EventType = "updated" DeletedEvent EventType = "deleted" InsertDBAction = "INSERT" UpdateDBAction = "UPDATE" DeleteDBAction = "DELETE" )
type FakePublisher ¶
type FakePublisher struct{}
func (*FakePublisher) Publish ¶
func (f *FakePublisher) Publish(Event)
type PubSubService ¶
type PubSubService interface { Publisher Subscriber }
PubSubService provides low-level access to pub-sub behaviours. Access is unauthenticated.
Click to show internal directories.
Click to hide internal directories.