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

Method UpdateConsumer

jsm.go:474–486  ·  view source on GitHub ↗
(stream string, cfg *ConsumerConfig, opts ...JSOpt)

Source from the content-addressed store, hash-verified

472}
473
474func (js *js) UpdateConsumer(stream string, cfg *ConsumerConfig, opts ...JSOpt) (*ConsumerInfo, error) {
475 if cfg == nil {
476 return nil, ErrConsumerConfigRequired
477 }
478 consumerName := cfg.Name
479 if consumerName == _EMPTY_ {
480 consumerName = cfg.Durable
481 }
482 if consumerName == _EMPTY_ {
483 return nil, ErrConsumerNameRequired
484 }
485 return js.upsertConsumer(stream, consumerName, cfg, opts...)
486}
487
488func (js *js) upsertConsumer(stream, consumerName string, cfg *ConsumerConfig, opts ...JSOpt) (*ConsumerInfo, error) {
489 if err := checkStreamName(stream); err != nil {

Callers

nothing calls this directly

Calls 1

upsertConsumerMethod · 0.95

Tested by

no test coverage detected