(subj string)
| 617 | } |
| 618 | |
| 619 | func (s *service) matchSubscriptionSubject(subj string) (*Endpoint, bool) { |
| 620 | s.m.Lock() |
| 621 | defer s.m.Unlock() |
| 622 | for _, verbSub := range s.verbSubs { |
| 623 | if verbSub.Subject == subj { |
| 624 | return nil, true |
| 625 | } |
| 626 | } |
| 627 | for _, e := range s.endpoints { |
| 628 | if matchEndpointSubject(e.Subject, subj) { |
| 629 | return e, true |
| 630 | } |
| 631 | } |
| 632 | return nil, false |
| 633 | } |
| 634 | |
| 635 | func matchEndpointSubject(endpointSubject, literalSubject string) bool { |
| 636 | subjectTokens := strings.Split(literalSubject, ".") |
no test coverage detected