Documentation
¶
Overview ¶
Package ordercreated records the orders of order.created events in app worker.
Index ¶
Constants ¶
View Source
const RecordedType = "order.recorded"
RecordedType is the type of the event Handle replies with.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler records orders.
func New ¶
New provides the handler; the generated function door gets it from here. The publisher announces the recorded orders, on the broker the function may read from. @Provide(index=0) @Inject(index=1)
func (*Handler) Handle ¶
func (h *Handler) Handle(ctx context.Context, in cloudevents.Event) (*cloudevents.Event, error)
Handle records the order of the event, announces it and replies with it. @Function(adapter=[cloudevents, nats, pubsub], app=worker, middlewares=[recovery, logger])
Click to show internal directories.
Click to hide internal directories.