Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeNATSJSONEvent ¶
func DecodeNATSJSONEvent(decoderMap map[string]interface{}) natstransport.DecodeRequestFunc
Caution: Do not cargo cult this code. This is meant for specific use case based on our understanding of the message payload possibilities. DecodeNATSJSONEvent decodes the nats payload based on the msg subject -> request object map definition.
decoderMap := map[string]interface{}{ OrderCreatedTopic: order.CreatedEvent{}, OrderCancelledTopic: order.CancelledEvent{}, }
func JSONErrorEncoder ¶
func JSONErrorEncoder(l log.Logger) natstransport.ErrorEncoder
JSONErrorEncoder is a nats RPC JSON reply error encoder
func JSONResponseEncoder ¶
func JSONResponseEncoder(encodeErr natstransport.ErrorEncoder) natstransport.EncodeResponseFunc
JSONResponseEncoder is a EncodeResponseFunc that serializes the response as a JSON object to the subscriber reply. Many JSON-over services can use it as a sensible default.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.