(stream string, cfg *ConsumerConfig, opts ...JSOpt)
| 472 | } |
| 473 | |
| 474 | func (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 | |
| 488 | func (js *js) upsertConsumer(stream, consumerName string, cfg *ConsumerConfig, opts ...JSOpt) (*ConsumerInfo, error) { |
| 489 | if err := checkStreamName(stream); err != nil { |
nothing calls this directly
no test coverage detected