MCPcopy
hub / github.com/nats-io/nats.go / ConsumerInfo

Method ConsumerInfo

jsm.go:634–649  ·  view source on GitHub ↗

ConsumerInfo returns information about a Consumer.

(stream, consumer string, opts ...JSOpt)

Source from the content-addressed store, hash-verified

632
633// ConsumerInfo returns information about a Consumer.
634func (js *js) ConsumerInfo(stream, consumer string, opts ...JSOpt) (*ConsumerInfo, error) {
635 if err := checkStreamName(stream); err != nil {
636 return nil, err
637 }
638 if err := checkConsumerName(consumer); err != nil {
639 return nil, err
640 }
641 o, cancel, err := getJSContextOpts(js.opts, opts...)
642 if err != nil {
643 return nil, err
644 }
645 if cancel != nil {
646 defer cancel()
647 }
648 return js.getConsumerInfoContext(o.ctx, stream, consumer)
649}
650
651// consumerLister fetches pages of ConsumerInfo objects. This object is not
652// safe to use for multiple threads.

Callers 2

subscribeMethod · 0.95
AddConsumerMethod · 0.95

Calls 4

checkStreamNameFunction · 0.85
checkConsumerNameFunction · 0.85
getJSContextOptsFunction · 0.85

Tested by

no test coverage detected