MCPcopy Index your code
hub / github.com/zalando/skipper / ExamplePriorityRoute

Function ExamplePriorityRoute

proxy/example_test.go:24–43  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

22}
23
24func ExamplePriorityRoute() {
25 // create a routing doc forwarding all requests,
26 // and load it in a data client:
27 routeDoc := `* -> "https://www.example.org"`
28 dataClient, err := testdataclient.NewDoc(routeDoc)
29 if err != nil {
30 log.Fatal(err)
31 }
32
33 // create a priority route making exceptions:
34 pr := &priorityRoute{}
35
36 // create an http.Handler:
37 proxy.New(
38 routing.New(routing.Options{
39 FilterRegistry: builtin.MakeRegistry(),
40 DataClients: []routing.DataClient{dataClient}}),
41 proxy.OptionsNone,
42 pr)
43}

Callers

nothing calls this directly

Calls 4

NewDocFunction · 0.92
NewFunction · 0.92
NewFunction · 0.92
MakeRegistryFunction · 0.92

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…