(r types.Route)
| 107 | } |
| 108 | |
| 109 | func (ep *testEntrypoint) StartAddRoute(r types.Route) error { |
| 110 | if r.ShouldExclude() { |
| 111 | ep.excludedRoutes.Add(r) |
| 112 | return nil |
| 113 | } |
| 114 | switch rt := r.(type) { |
| 115 | case types.HTTPRoute: |
| 116 | ep.httpRoutes.Add(rt) |
| 117 | return nil |
| 118 | case types.StreamRoute: |
| 119 | ep.streamRoutes.Add(rt) |
| 120 | return nil |
| 121 | default: |
| 122 | return fmt.Errorf("unknown route type: %T", r) |
| 123 | } |
| 124 | } |
| 125 | |
| 126 | func (ep *testEntrypoint) IterRoutes(yield func(r types.Route) bool) { |
| 127 | ep.httpRoutes.Iter(func(_ string, r types.HTTPRoute) bool { |
nothing calls this directly
no test coverage detected