package
0.0.0-20191020161600-58998d98f9ce
Repository: https://github.com/etherlabsio/pkg.git
Documentation: pkg.go.dev

# Functions

EncodeJSONRequest is an EncodeRequestFunc that serializes the request as a JSON object to the Data of the Msg.
NewPublisher constructs a usable Publisher for a single remote method.
NewRecoveryMiddleware returns as RecoveryMiddleware handler.
NewSubscriber constructs a new subscriber, which provides nats.MsgHandler and wraps the provided endpoint.
NopRequestDecoder is a DecodeRequestFunc that can be used for requests that do not need to be decoded, and simply returns nil, nil.
PublisherBefore sets the RequestFuncs that are applied to the outgoing NATS request before it's invoked.
No description provided by the author
PublisherTimeout sets the available timeout for NATS request.
No description provided by the author
No description provided by the author
SubscriberBefore functions are executed on the subscriber request object before the request is decoded.
SubscriberErrorLogger is used to log non-terminal errors.
No description provided by the author

# Structs

Publisher wraps a URL and provides a method that implements endpoint.Endpoint.
RecoveryMiddleware intercepts the nats messages and performs recovery on panic.
Subscriber wraps an endpoint and provides nats.MsgHandler.
No description provided by the author

# Interfaces

Handler serves messages for NATS.

# Type aliases

DecodeRequestFunc extracts a user-domain request object from a publisher request object.
PublisherOption sets an optional parameter for clients.
No description provided by the author
SubscriberOption sets an optional parameter for subscribers.