Versions in this module Expand all Collapse all v1 v1.1.0 Aug 15, 2026 v1.0.0 Aug 15, 2026 Changes in this version + func TrimNamespace(nsp string) string + type Conn struct + func Dial(ctx context.Context, rawURL string, opts Options) (*Conn, error) + func (c *Conn) AddConsumer(req protocol.AddConsumerReq) error + func (c *Conn) Close() error + func (c *Conn) Connected() bool + func (c *Conn) CreateStream(req protocol.CreateStreamReq) (*protocol.StreamMeta, error) + func (c *Conn) DeleteConsumer(stream, name string) error + func (c *Conn) DeleteStream(name string) error + func (c *Conn) Emit(nsp, event string, req any, out any) error + func (c *Conn) Publish(subject string, data []byte, header map[string]string) error + func (c *Conn) PurgeStream(name string) error + func (c *Conn) Request(subject string, data []byte, timeout time.Duration) (protocol.ReplyMsg, error) + func (c *Conn) Stats() (protocol.StatsSnapshot, error) + func (c *Conn) StreamAck(consumer string, seq uint64) error + func (c *Conn) StreamInfo(name string) (protocol.StreamInfoAck, error) + func (c *Conn) StreamNak(consumer string, seq uint64, delay time.Duration) error + func (c *Conn) StreamPublish(stream, subject string, data []byte, msgID string, header map[string]string) (protocol.StreamPublishAck, error) + func (c *Conn) StreamPull(consumer string, batch int, wait time.Duration) ([]protocol.Message, error) + func (c *Conn) Subscribe(subject, queue string, handler func(protocol.Message)) (*Subscription, error) + type Options struct + ControlToken string + Logger *slog.Logger + Reconnection bool + type Subscription struct + func (s *Subscription) Close() error + func (s *Subscription) Queue() string + func (s *Subscription) Subject() string