Documentation ¶
Index ¶
Constants ¶
View Source
const CollectionName = "outbox"
Variables ¶
This section is empty.
Functions ¶
func NewEmitter ¶
func NewEmitter(o EmitterOptions) (hevent.Emitter, error)
Types ¶
type EmitterOptions ¶
type EmitterOptions struct { Outbox OutboxStore ContextPropagator hexa.ContextPropagator Encoder hevent.Encoder }
func (EmitterOptions) Validate ¶
func (o EmitterOptions) Validate() error
type MessageConverter ¶
type OutboxMessage ¶
type OutboxMessage struct { ID string `bson:"id" json:"id"` Topic string `bson:"topic" json:"topic"` Key string `bson:"key" json:"key"` Value string `bson:"value" json:"value"` Headers []Header `bson:"headers" json:"headers"` EmittedAt time.Time `bson:"emitted_at" json:"emitted_at"` }
OutboxMessage is the outbox collection's model
type OutboxStore ¶
type OutboxStore interface { hexa.Shutdownable Migrate() error // do migration if needed. Create(c context.Context, msg *OutboxMessage) error Ping(c context.Context) error }
func NewOutboxStore ¶
func NewOutboxStore(coll *mongo.Collection) OutboxStore
Click to show internal directories.
Click to hide internal directories.