()
| 7 | ) |
| 8 | |
| 9 | func Example() { |
| 10 | // open file with a routing table: |
| 11 | dataClient := eskipfile.Watch("/some/path/to/routing-table.eskip") |
| 12 | defer dataClient.Close() |
| 13 | |
| 14 | // create a routing object: |
| 15 | rt := routing.New(routing.Options{ |
| 16 | DataClients: []routing.DataClient{dataClient}, |
| 17 | }) |
| 18 | defer rt.Close() |
| 19 | |
| 20 | // create an http.Handler: |
| 21 | p := proxy.New(rt, proxy.OptionsNone) |
| 22 | defer p.Close() |
| 23 | } |