MCPcopy
hub / github.com/yusing/godoxy / StartAddRoute

Method StartAddRoute

internal/route/reverse_proxy_test.go:109–124  ·  view source on GitHub ↗
(r types.Route)

Source from the content-addressed store, hash-verified

107}
108
109func (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
126func (ep *testEntrypoint) IterRoutes(yield func(r types.Route) bool) {
127 ep.httpRoutes.Iter(func(_ string, r types.HTTPRoute) bool {

Callers

nothing calls this directly

Calls 2

ShouldExcludeMethod · 0.65
AddMethod · 0.65

Tested by

no test coverage detected