Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActionType ¶
type ActionType string
const ( ActionTypeCreate ActionType = "create" ActionTypeUpdate ActionType = "update" ActionTypeDelete ActionType = "delete" )
type Client ¶
type DefaultEvent ¶
type DefaultEvent struct { // ResourceID is the ResourceID of the object that was created, updated or deleted. ResourceID uuid.UUID // ActionType is the type of the event. ActionType ActionType // AdditionalData is additional data that can be used to pass additional information. AdditionalData map[string]any }
func (*DefaultEvent) Action ¶
func (d *DefaultEvent) Action() ActionType
Action is the type of the event.
func (*DefaultEvent) ID ¶
func (d *DefaultEvent) ID() uuid.UUID
ID is the ID of the object that was created, updated or deleted.
type Event ¶
type Event interface { // ID is the ID of the object that was created, updated or deleted. ID() uuid.UUID // Action is the type of the event. Action() ActionType }
type PublishSubscriber ¶
type PublishSubscriber interface { Publisher Subscriber }
type SubscribeDater ¶
type SubscribeDater interface { // Ack acknowledges the message. Ack() // Data returns the message data. Data() []byte }
type Subscriber ¶
type Subscriber interface { // Subscribe returns a channel that will receive messages. // This function blocks until the subscription is ready (unbuffered channel). Subscribe() (<-chan SubscribeDater, error) }
Click to show internal directories.
Click to hide internal directories.