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

Function validateConsumerName

jetstream/consumer.go:530–538  ·  view source on GitHub ↗
(name string)

Source from the content-addressed store, hash-verified

528}
529
530func validateConsumerName(name string) error {
531 if name == "" {
532 return fmt.Errorf("%w: name is required", ErrInvalidConsumerName)
533 }
534 if strings.ContainsAny(name, ">*. /\\\t\r\n") {
535 return fmt.Errorf("%w: %q", ErrInvalidConsumerName, name)
536 }
537 return nil
538}
539
540func unpinConsumer(ctx context.Context, js *jetStream, stream, consumer, group string) error {
541 ctx, cancel := js.wrapContextWithoutDeadline(ctx)

Callers 7

upsertConsumerFunction · 0.85
fetchConsumerInfoFunction · 0.85
deleteConsumerFunction · 0.85
pauseConsumerFunction · 0.85
resetConsumerFunction · 0.85
unpinConsumerFunction · 0.85
TestValidateConsumerNameFunction · 0.85

Calls 1

ErrorfMethod · 0.80

Tested by 1

TestValidateConsumerNameFunction · 0.68