Documentation ¶
Index ¶
- type AtomBool
- type Context
- func (ctx *Context) Close()
- func (ctx *Context) Connect(username string, register, subscribe []string) error
- func (ctx *Context) Payload(msg *server.Msg) []byte
- func (ctx *Context) Publish(channel string, message []byte) error
- func (ctx *Context) PublishStr(channel string, message string) error
- func (ctx *Context) PublishTTL(channel string, message []byte, ttl int) error
- func (ctx *Context) PublishTTLStr(channel string, message string, ttl int) error
- func (ctx *Context) Register(channel string) error
- func (ctx *Context) Subscribe(channel string) (err error)
- func (ctx *Context) Topic(msg *server.Msg) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Context ¶
type Context struct { Config map[string]string InMsgs chan *server.Msg SubToIndex map[string]int Subscriptions []*server.Subscription SubChannels []string Client *server.Conn Connected *AtomBool Tick *server.Msg }
Context contains the necessary information to run the Nats client
func (*Context) PublishTTL ¶
func (*Context) PublishTTLStr ¶
Click to show internal directories.
Click to hide internal directories.