Documentation ¶
Index ¶
- func AddConsumer(streamName string, config *nats.ConsumerConfig) (err error)
- func AddStream(streamName string, subjects []string) error
- func Connect(clientName string, servers []string, options ...Option)
- func DelConsumer(stream, consumer string) (err error)
- func DelStream(streamName string) (err error)
- func JsPub(subj string, data []byte) (err error)
- func JsQueueSubscribe(subject, queueName string, handler nats.MsgHandler) (err error)
- func JsSub(subj string, handler nats.MsgHandler) (err error)
- func NewZlogLoggerWithNATS(level string, subj string)
- func Pub(ctx context.Context, subj string, data []byte)
- func PubGo(ctx context.Context, subj string, data any)
- func QueueSub(subj, queue string, handler nats.MsgHandler) (err error)
- func QueueSubSyncWithChan(subject, queueName string, handler chan *nats.Msg) (sub *nats.Subscription, err error)
- func Request(subj string, data []byte, timeout time.Duration) (*nats.Msg, error)
- func Sub(subj string, handler nats.MsgHandler) (err error)
- type Option
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddConsumer ¶
AddConsumer 添加流消费者
func JsQueueSubscribe ¶
JsQueueSubscribe 队列方式订阅流消息(分布式场景使用)
func NewZlogLoggerWithNATS ¶ added in v0.3.0
func QueueSubSyncWithChan ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.