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

Function Example

etcd/example_test.go:25–47  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

23)
24
25func Example() {
26 // create etcd data client:
27 dataClient, err := etcd.New(etcd.Options{
28 Endpoints: []string{"https://etcd.example.org"},
29 Prefix: "/skipper",
30 Timeout: 0,
31 Insecure: false,
32 })
33
34 if err != nil {
35 log.Fatal(err)
36 }
37
38 // create routing object:
39 rt := routing.New(routing.Options{
40 FilterRegistry: builtin.MakeRegistry(),
41 DataClients: []routing.DataClient{dataClient}})
42 defer rt.Close()
43
44 // create http.Handler:
45 p := proxy.New(rt, proxy.OptionsNone)
46 defer p.Close()
47}

Callers

nothing calls this directly

Calls 5

NewFunction · 0.92
NewFunction · 0.92
MakeRegistryFunction · 0.92
NewFunction · 0.92
CloseMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…