Documentation
¶
Index ¶
Constants ¶
View Source
const ( // ErrEmptyConfig when given empty options ErrEmptyConfig = Error("nats empty config") // ErrEmptyStreamerConfig when given empty options ErrEmptyStreamerConfig = Error("nats-streamer empty config") // ErrEmptyConnection when empty nats.Conn ErrEmptyConnection = Error("nats connection empty") // ErrClusterIDEmpty when empty clusterID ErrClusterIDEmpty = Error("nats.cluster_id cannot be empty") // ErrClientIDEmpty when empty clientID ErrClientIDEmpty = Error("nats.client_id cannot be empty") )
Variables ¶
View Source
var ( // Module is default Nats client Module = module.Module{ {Constructor: NewDefaultConfig}, {Constructor: NewConnection}, {Constructor: NewDefaultStreamerConfig}, {Constructor: NewStreamer}, } )
Functions ¶
func NewStreamer ¶
func NewStreamer(opts *StreamerConfig) (stan.Conn, error)
NewStreamer is nats-streamer client
Types ¶
type Client ¶
type Client = nats.Conn
Client alias
func NewConnection ¶
NewConnection of nats client
type StreamerConfig ¶
StreamerConfig for NSS client
func NewDefaultStreamerConfig ¶
func NewDefaultStreamerConfig(p StreamerParams) (*StreamerConfig, error)
NewDefaultStreamerConfig default settings for streaming connection
Click to show internal directories.
Click to hide internal directories.