(name string, opts ...GroupOpt)
| 879 | } |
| 880 | |
| 881 | func (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 | |
| 905 | func (e *Endpoint) stop() error { |
| 906 | // Drain the subscription. If the connection is closed, draining is not possible |
nothing calls this directly
no test coverage detected