Documentation ¶
Index ¶
Constants ¶
View Source
const ( PersonGetEventTopic = "person:get" PersonDeletedEventTopic = "person:delete" PersonUpdatedEventTopic = "person:update" PersonPostEventTopic = "person:post" )
View Source
const ( PersonUpdatedEventType = EventType("Person was updated") PersonDeletedEventType = EventType("Person was deleted") PersonGetEventType = EventType("Get person request processed") PersonPostEventType = EventType("Post person request processed") )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EventBusSession ¶
type EventBusSession struct {
// contains filtered or unexported fields
}
func NewEventBusSession ¶
func NewEventBusSession() *EventBusSession
func (*EventBusSession) AsyncConsumeEvents ¶
func (s *EventBusSession) AsyncConsumeEvents(ctx context.Context, topic string, handler any)
func (*EventBusSession) PublishEvent ¶
func (s *EventBusSession) PublishEvent(ctx context.Context, topic string, event any)
type PersonDeletedEvent ¶
type PersonDeletedEvent struct { Type EventType Payload PersonDeletedEventPayload }
type PersonDeletedEventPayload ¶
type PersonDeletedEventPayload struct {
ID string
}
type PersonGetEvent ¶
type PersonGetEvent struct { Type EventType Payload PersonGetEventPayload }
type PersonGetEventPayload ¶
type PersonPostEvent ¶
type PersonPostEvent struct { Type EventType Payload PersonPostEventPayload }
type PersonPostEventPayload ¶
type PersonUpdatedEvent ¶
type PersonUpdatedEvent struct { Type EventType Payload PersonUpdatedEventPayload }
type PersonUpdatedEventPayload ¶
type PersonUpdatedEventPayload struct {
ID string
}
Click to show internal directories.
Click to hide internal directories.