ordercreated

package
v1.8.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 19, 2026 License: MIT Imports: 6 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package ordercreated records the orders of order.created events in app order-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

func New(svc *order.Service, pub *publisher.Publisher) *Handler

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; only the nats and pubsub drivers (and noop, the default) are generated, so the worker links no Kafka client nor librdkafka. @Provide(index=0) @Inject(index=1, name=orders, drivers=[nats, pubsub])

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=order-worker, client=orders, middlewares=[recovery, logger])

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL