(prefixes map[string]func(Function), id string)
| 716 | } |
| 717 | |
| 718 | func matchPrefix(prefixes map[string]func(Function), id string) (string, func(Function), bool) { |
| 719 | if len(prefixes) == 0 || id == "" { |
| 720 | return "", nil, false |
| 721 | } |
| 722 | |
| 723 | for prefix, handler := range prefixes { |
| 724 | if strings.HasPrefix(id, prefix) { |
| 725 | return prefix, handler, true |
| 726 | } |
| 727 | } |
| 728 | |
| 729 | return "", nil, false |
| 730 | } |
| 731 | |
| 732 | func (m *Manager) lookupFunctionRoute(fn Function) (handler func(Function), scheduleKey string, ok bool) { |
| 733 | snap, ok := m.snapshotFunction(fn.Name) |
no outgoing calls
no test coverage detected
searching dependent graphs…