Codebase list golang-github-go-kit-kit / 28a1b0d
Segregate imports per go-kit conventions Ben Sigelman 7 years ago
11 changed file(s) with 27 addition(s) and 20 deletion(s). Raw diff Collapse all Expand all
22 import (
33 "io"
44
5 kitot "github.com/go-kit/kit/tracing/opentracing"
6 "github.com/opentracing/opentracing-go"
57 "google.golang.org/grpc"
68
79 "github.com/go-kit/kit/endpoint"
810 "github.com/go-kit/kit/examples/addsvc/pb"
911 "github.com/go-kit/kit/loadbalancer"
1012 "github.com/go-kit/kit/log"
11 kitot "github.com/go-kit/kit/tracing/opentracing"
1213 grpctransport "github.com/go-kit/kit/transport/grpc"
13 "github.com/opentracing/opentracing-go"
1414 )
1515
1616 // MakeSumEndpointFactory returns a loadbalancer.Factory that transforms GRPC
22 import (
33 "io"
44 "net/url"
5
6 "github.com/opentracing/opentracing-go"
57
68 "github.com/go-kit/kit/endpoint"
79 "github.com/go-kit/kit/examples/addsvc/server"
911 "github.com/go-kit/kit/log"
1012 kitot "github.com/go-kit/kit/tracing/opentracing"
1113 httptransport "github.com/go-kit/kit/transport/http"
12 "github.com/opentracing/opentracing-go"
1314 )
1415
1516 // MakeSumEndpointFactory generates a Factory that transforms an http url into
88 "strings"
99 "time"
1010
11 "github.com/lightstep/lightstep-tracer-go"
12 "github.com/opentracing/opentracing-go"
13 appdashot "github.com/sourcegraph/appdash/opentracing"
1114 "golang.org/x/net/context"
15 "sourcegraph.com/sourcegraph/appdash"
1216
1317 "github.com/go-kit/kit/endpoint"
1418 grpcclient "github.com/go-kit/kit/examples/addsvc/client/grpc"
1923 "github.com/go-kit/kit/loadbalancer/static"
2024 "github.com/go-kit/kit/log"
2125 kitot "github.com/go-kit/kit/tracing/opentracing"
22 "github.com/lightstep/lightstep-tracer-go"
23 "github.com/opentracing/opentracing-go"
24 appdashot "github.com/sourcegraph/appdash/opentracing"
25 "sourcegraph.com/sourcegraph/appdash"
2626 )
2727
2828 func main() {
11
22 import (
33 "golang.org/x/net/context"
4
5 "github.com/opentracing/opentracing-go"
46
57 "github.com/go-kit/kit/examples/addsvc/pb"
68 "github.com/go-kit/kit/examples/addsvc/server"
810 "github.com/go-kit/kit/log"
911 kitot "github.com/go-kit/kit/tracing/opentracing"
1012 "github.com/go-kit/kit/transport/grpc"
11 "github.com/opentracing/opentracing-go"
1213 )
1314
1415 type grpcBinding struct {
1414 "time"
1515
1616 "github.com/apache/thrift/lib/go/thrift"
17 kitot "github.com/go-kit/kit/tracing/opentracing"
1817 "github.com/lightstep/lightstep-tracer-go"
1918 "github.com/opentracing/opentracing-go"
2019 stdprometheus "github.com/prometheus/client_golang/prometheus"
3130 "github.com/go-kit/kit/metrics"
3231 "github.com/go-kit/kit/metrics/expvar"
3332 "github.com/go-kit/kit/metrics/prometheus"
33 kitot "github.com/go-kit/kit/tracing/opentracing"
3434 "github.com/go-kit/kit/tracing/zipkin"
3535 httptransport "github.com/go-kit/kit/transport/http"
3636 )
00 package opentracing
11
22 import (
3 "github.com/go-kit/kit/endpoint"
43 "github.com/opentracing/opentracing-go"
54 otext "github.com/opentracing/opentracing-go/ext"
65 "golang.org/x/net/context"
6
7 "github.com/go-kit/kit/endpoint"
78 )
89
910 // TraceServer returns a Middleware that wraps the `next` Endpoint in an
22 import (
33 "testing"
44
5 "github.com/go-kit/kit/endpoint"
6 kitot "github.com/go-kit/kit/tracing/opentracing"
75 "github.com/opentracing/opentracing-go"
86 "github.com/opentracing/opentracing-go/mocktracer"
97 "golang.org/x/net/context"
8
9 "github.com/go-kit/kit/endpoint"
10 kitot "github.com/go-kit/kit/tracing/opentracing"
1011 )
1112
1213 func TestTraceServer(t *testing.T) {
00 package opentracing
11
22 import (
3 "github.com/go-kit/kit/log"
43 "github.com/opentracing/opentracing-go"
54 "golang.org/x/net/context"
65 "google.golang.org/grpc/metadata"
6
7 "github.com/go-kit/kit/log"
78 )
89
910 // ToGRPCRequest returns a grpc RequestFunc that injects an OpenTracing Span
22 import (
33 "testing"
44
5 "github.com/opentracing/opentracing-go"
6 "github.com/opentracing/opentracing-go/mocktracer"
7 "golang.org/x/net/context"
58 "google.golang.org/grpc/metadata"
69
710 kitot "github.com/go-kit/kit/tracing/opentracing"
811 "github.com/go-kit/kit/transport/grpc"
9 "github.com/opentracing/opentracing-go"
10 "github.com/opentracing/opentracing-go/mocktracer"
11 "golang.org/x/net/context"
1212 )
1313
1414 func TestTraceGRPCRequestRoundtrip(t *testing.T) {
44 "net/http"
55 "strconv"
66
7 "github.com/go-kit/kit/log"
8 kithttp "github.com/go-kit/kit/transport/http"
97 "github.com/opentracing/opentracing-go"
108 "github.com/opentracing/opentracing-go/ext"
119 "golang.org/x/net/context"
10
11 "github.com/go-kit/kit/log"
12 kithttp "github.com/go-kit/kit/transport/http"
1213 )
1314
1415 // ToHTTPRequest returns an http RequestFunc that injects an OpenTracing Span
33 "net/http"
44 "testing"
55
6 kitot "github.com/go-kit/kit/tracing/opentracing"
7 kithttp "github.com/go-kit/kit/transport/http"
86 "github.com/opentracing/opentracing-go"
97 "github.com/opentracing/opentracing-go/mocktracer"
108 "golang.org/x/net/context"
9
10 kitot "github.com/go-kit/kit/tracing/opentracing"
11 kithttp "github.com/go-kit/kit/transport/http"
1112 )
1213
1314 func TestTraceHTTPRequestRoundtrip(t *testing.T) {