Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewEmailEventSender ¶
NewEmailEventSender creates a new Sender that publishes events
Types ¶
type Bus ¶
type Bus interface {
// Publish publishes an event to a topic
Publish(ctx context.Context, topic string, payload map[string]interface{}, metadata map[string]string) error
// Subscribe subscribes to a topic with a consumer group
Subscribe(ctx context.Context, topic string, group string, handler Handler) error
// Close closes the bus connection
Close() error
}
Bus defines the interface for an event bus
type EmailSenderWrapper ¶
type EmailSenderWrapper struct {
// contains filtered or unexported fields
}
EmailSenderWrapper implements email.Sender using Event Bus
func (*EmailSenderWrapper) Close ¶
func (s *EmailSenderWrapper) Close()
type Event ¶
type Event struct {
ID string `json:"id"`
Topic string `json:"topic"`
Payload map[string]interface{} `json:"payload"`
Metadata map[string]string `json:"metadata,omitempty"`
Timestamp time.Time `json:"timestamp"`
}
Event represents a system event
type RedisBus ¶
type RedisBus struct {
// contains filtered or unexported fields
}
RedisBus implements Bus using Redis Streams
func NewRedisBus ¶
func NewRedisBus(client redis.UniversalClient) *RedisBus
NewRedisBus creates a new RedisBus
Click to show internal directories.
Click to hide internal directories.