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

Method AddGroup

micro/service.go:881–903  ·  view source on GitHub ↗
(name string, opts ...GroupOpt)

Source from the content-addressed store, hash-verified

879}
880
881func (g *group) AddGroup(name string, opts ...GroupOpt) Group {
882 var o groupOpts
883 for _, opt := range opts {
884 opt(&o)
885 }
886 queueGroup, noQueue := resolveQueueGroup(o.queueGroup, g.queueGroup, o.qgDisabled, g.queueGroupDisabled)
887
888 parts := make([]string, 0, 2)
889 if g.prefix != "" {
890 parts = append(parts, g.prefix)
891 }
892 if name != "" {
893 parts = append(parts, name)
894 }
895 prefix := strings.Join(parts, ".")
896
897 return &group{
898 service: g.service,
899 prefix: prefix,
900 queueGroup: queueGroup,
901 queueGroupDisabled: noQueue,
902 }
903}
904
905func (e *Endpoint) stop() error {
906 // Drain the subscription. If the connection is closed, draining is not possible

Callers

nothing calls this directly

Calls 1

resolveQueueGroupFunction · 0.85

Tested by

no test coverage detected