clean-up of several formatting and comment typos
Bas van Beek
7 years ago
16 | 16 |
// received from an endpoint.
|
17 | 17 |
var ErrBadCast = errors.New("bad cast")
|
18 | 18 |
|
19 | |
// ContextCanceled indicates the request context was canceled.
|
|
19 |
// ErrContextCanceled indicates the request context was canceled.
|
20 | 20 |
var ErrContextCanceled = errors.New("context canceled")
|
21 | 21 |
|
22 | 22 |
// Chain is a helper function for composing middlewares. Requests will
|
11 | 11 |
"golang.org/x/net/context"
|
12 | 12 |
)
|
13 | 13 |
|
14 | |
// Client is a wrapper arround the etcd client.
|
|
14 |
// Client is a wrapper around the etcd client.
|
15 | 15 |
type Client interface {
|
16 | 16 |
// GetEntries will query the given prefix in etcd and returns a set of entries.
|
17 | 17 |
GetEntries(prefix string) ([]string, error)
|
32 | 32 |
return nil, err
|
33 | 33 |
}
|
34 | 34 |
|
35 | |
// intial node retrieval and cache fill
|
|
35 |
// initial node retrieval and cache fill
|
36 | 36 |
instances, eventc, err := p.client.GetEntries(p.path)
|
37 | 37 |
if err != nil {
|
38 | 38 |
logger.Log("path", p.path, "msg", "failed to retrieve entries", "err", err)
|
29 | 29 |
mkdir zipkin
|
30 | 30 |
cd zipkin
|
31 | 31 |
vagrant init bas303/zipkin
|
32 | |
vagrant-up --provider virtualbox
|
|
32 |
vagrant up --provider virtualbox
|
33 | 33 |
```
|
34 | 34 |
|
35 | 35 |
[Zipkin]: http://zipkin.io/
|
34 | 34 |
options ...ServerOption,
|
35 | 35 |
) *Server {
|
36 | 36 |
s := &Server{
|
37 | |
ctx: ctx,
|
38 | |
e: e,
|
39 | |
dec: dec,
|
40 | |
enc: enc,
|
|
37 |
ctx: ctx,
|
|
38 |
e: e,
|
|
39 |
dec: dec,
|
|
40 |
enc: enc,
|
41 | 41 |
logger: log.NewNopLogger(),
|
42 | 42 |
}
|
43 | 43 |
for _, option := range options {
|
118 | 118 |
b := make([]byte, len(testbody))
|
119 | 119 |
_, err = response.Body.Read(b)
|
120 | 120 |
if want, have := io.EOF, err; have != want {
|
121 | |
t.Fatal("want %q, have %q", want, have)
|
|
121 |
t.Fatalf("want %q, have %q", want, have)
|
122 | 122 |
}
|
123 | 123 |
if want, have := testbody, string(b); want != have {
|
124 | 124 |
t.Errorf("want %q, have %q", want, have)
|