Documentation ¶
Overview ¶
Package nats provides a Vice implementation for NATS.
Index ¶
Constants ¶
View Source
const DefaultAddr = nats.DefaultURL
DefaultAddr is the NATS default TCP address.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(*Options)
Option is a function on the options for a nats transport.
func WithConnection ¶
func WithConnection(c *nats.Conn) Option
WithConnection is an Option to set underlying nats connection.
func WithStreaming ¶
WithStreaming is an Option to activate nats streaming for the transport.
type Options ¶
type Options struct { Conn *nats.Conn StreamingClusterID string StreamingClientID string UseStreaming bool }
Options can be used to create a customized transport.
type Transport ¶
type Transport struct { sync.Mutex // exported fields NatsAddr string // contains filtered or unexported fields }
Transport is a vice.Transport for NATS queue.
func (*Transport) Done ¶
func (t *Transport) Done() chan struct{}
Done gets a channel which is closed when the transport has successfully stopped.
func (*Transport) Receive ¶
Receive gets a channel on which to receive messages with the specified name.
Click to show internal directories.
Click to hide internal directories.