()
| 22 | } |
| 23 | |
| 24 | func 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 | } |
nothing calls this directly
no test coverage detected
searching dependent graphs…