Documentation ¶
Index ¶
Constants ¶
View Source
const UUIDHeaderKey = "_watermill_message_uuid"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type RegisterHttpHandler ¶
Register the route `pattern` that matches http method to execute the `handler`.
type Subscriber ¶
type Subscriber struct {
// contains filtered or unexported fields
}
func NewSubscriber ¶
func NewSubscriber( config SubscriberConfig, logger watermill.LoggerAdapter, ) (*Subscriber, error)
func (*Subscriber) Close ¶
func (s *Subscriber) Close() error
func (*Subscriber) Subscribe ¶
Subscribe creates a HTTP handler which will listen on provided url for messages. The callee must register this HTTP handler on it's mux of choice before calling `StartHTTPServer` or equivalent.
When request is sent, it will wait for the `Ack`. When Ack is received 200 HTTP status will be sent. When Nack is sent, 500 HTTP status will be sent.
type SubscriberConfig ¶
type SubscriberConfig struct { RegisterHttpHandler RegisterHttpHandler UnmarshalMessageFunc UnmarshalMessageFunc }
Click to show internal directories.
Click to hide internal directories.