Documentation ¶
Index ¶
Constants ¶
View Source
const ServerName = "platform"
Variables ¶
View Source
var ErrNoNatsConnection = errors.New("nats connection has not been established. Call Open() first")
Functions ¶
This section is empty.
Types ¶
type AsyncPublisher ¶
func NewAsyncPublisher ¶
func NewAsyncPublisher(clientID string) *AsyncPublisher
func (*AsyncPublisher) Open ¶
func (p *AsyncPublisher) Open() error
Open creates and maintains a connection to NATS server
type Config ¶
type Config struct { // The directory where nats persists message information FilestoreDir string }
Config is the configuration for the NATS streaming server
type Handler ¶
type Handler interface { // Process does something with a received subscription message, then acks it. Process(s Subscription, m Message) }
type LogHandler ¶
func (*LogHandler) Process ¶
func (lh *LogHandler) Process(s Subscription, m Message)
type QueueSubscriber ¶
func NewQueueSubscriber ¶
func NewQueueSubscriber(clientID string) *QueueSubscriber
func (*QueueSubscriber) Open ¶
func (s *QueueSubscriber) Open() error
Open creates and maintains a connection to NATS server
type Server ¶
type Server struct { Server *stand.StanServer // contains filtered or unexported fields }
Server wraps a connection to a NATS streaming server
type Subscriber ¶
type Subscription ¶
type Subscription interface { // Pending returns the number of queued messages and queued bytes for this subscription. Pending() (int64, int64, error) // Delivered returns the number of delivered messages for this subscription. Delivered() (int64, error) // Close removes this subscriber Close() error }
Click to show internal directories.
Click to hide internal directories.