Package list golang-github-go-kit-kit / 4a29204
Use stdlib context instead of golang.org/x/net/context Peter Bourgon 4 years ago
76 changed file(s) with 90 addition(s) and 105 deletion(s). Raw diff Collapse all Expand all
9191
9292 ```go
9393 import (
94 "golang.org/x/net/context"
94 "context"
9595
9696 "github.com/go-kit/kit/auth/jwt"
9797 "github.com/go-kit/kit/log"
00 package jwt
11
22 import (
3 "context"
34 "errors"
45
56 jwt "github.com/dgrijalva/jwt-go"
6 "golang.org/x/net/context"
77
88 "github.com/go-kit/kit/endpoint"
99 )
00 package jwt
11
22 import (
3 "context"
34 "testing"
45
56 jwt "github.com/dgrijalva/jwt-go"
6
7 "golang.org/x/net/context"
87 )
98
109 var (
00 package jwt
11
22 import (
3 "context"
34 "fmt"
45 stdhttp "net/http"
56 "strings"
67
7 "golang.org/x/net/context"
88 "google.golang.org/grpc/metadata"
99
1010 "github.com/go-kit/kit/transport/grpc"
00 package jwt
11
22 import (
3 "context"
34 "fmt"
45 "net/http"
56 "testing"
67
78 "google.golang.org/grpc/metadata"
8
9 "golang.org/x/net/context"
109 )
1110
1211 func TestToHTTPContext(t *testing.T) {
00 package circuitbreaker
11
22 import (
3 "context"
4
35 "github.com/sony/gobreaker"
4 "golang.org/x/net/context"
56
67 "github.com/go-kit/kit/endpoint"
78 )
00 package circuitbreaker
11
22 import (
3 "context"
34 "time"
45
56 "github.com/streadway/handy/breaker"
6 "golang.org/x/net/context"
77
88 "github.com/go-kit/kit/endpoint"
99 )
00 package circuitbreaker
11
22 import (
3 "context"
4
35 "github.com/afex/hystrix-go/hystrix"
4 "golang.org/x/net/context"
56
67 "github.com/go-kit/kit/endpoint"
78 )
00 package circuitbreaker_test
11
22 import (
3 "context"
34 "errors"
45 "fmt"
56 "path/filepath"
67 "runtime"
78 "testing"
89 "time"
9
10 "golang.org/x/net/context"
1110
1211 "github.com/go-kit/kit/endpoint"
1312 )
00 package endpoint
11
22 import (
3 "golang.org/x/net/context"
3 "context"
44 )
55
66 // Endpoint is the fundamental building block of servers and clients.
00 package endpoint_test
11
22 import (
3 "context"
34 "fmt"
4
5 "golang.org/x/net/context"
65
76 "github.com/go-kit/kit/endpoint"
87 )
00 package main
11
22 import (
3 "context"
34 "flag"
45 "fmt"
56 "os"
1112 "github.com/lightstep/lightstep-tracer-go"
1213 stdopentracing "github.com/opentracing/opentracing-go"
1314 zipkin "github.com/openzipkin/zipkin-go-opentracing"
14 "golang.org/x/net/context"
1515 "google.golang.org/grpc"
1616 "sourcegraph.com/sourcegraph/appdash"
1717 appdashot "sourcegraph.com/sourcegraph/appdash/opentracing"
00 package main
11
22 import (
3 "context"
34 "flag"
45 "fmt"
56 "net"
1516 stdopentracing "github.com/opentracing/opentracing-go"
1617 zipkin "github.com/openzipkin/zipkin-go-opentracing"
1718 stdprometheus "github.com/prometheus/client_golang/prometheus"
18 "golang.org/x/net/context"
1919 "google.golang.org/grpc"
2020 "sourcegraph.com/sourcegraph/appdash"
2121 appdashot "sourcegraph.com/sourcegraph/appdash/opentracing"
88 "fmt"
99 "time"
1010
11 "golang.org/x/net/context"
11 "context"
1212
1313 "github.com/go-kit/kit/endpoint"
1414 "github.com/go-kit/kit/log"
2020 import math "math"
2121
2222 import (
23 context "golang.org/x/net/context"
23 context "context"
2424 grpc "google.golang.org/grpc"
2525 )
2626
66 "errors"
77 "time"
88
9 "golang.org/x/net/context"
9 "context"
1010
1111 "github.com/go-kit/kit/log"
1212 "github.com/go-kit/kit/metrics"
33 // It utilizes the transport/grpc.Server.
44
55 import (
6 "context"
67 stdopentracing "github.com/opentracing/opentracing-go"
7 "golang.org/x/net/context"
88
99 "github.com/go-kit/kit/examples/addsvc/pb"
1010 "github.com/go-kit/kit/log"
99 "io/ioutil"
1010 "net/http"
1111
12 "context"
1213 stdopentracing "github.com/opentracing/opentracing-go"
13 "golang.org/x/net/context"
1414
1515 "github.com/go-kit/kit/log"
1616 "github.com/go-kit/kit/tracing/opentracing"
66 // yet. See https://github.com/go-kit/kit/issues/184.
77
88 import (
9 "golang.org/x/net/context"
9 "context"
1010
1111 "github.com/go-kit/kit/endpoint"
1212 thriftadd "github.com/go-kit/kit/examples/addsvc/thrift/gen-go/addsvc"
11
22 import (
33 "bytes"
4 "context"
45 "encoding/json"
56 "flag"
67 "fmt"
1718 "github.com/gorilla/mux"
1819 "github.com/hashicorp/consul/api"
1920 stdopentracing "github.com/opentracing/opentracing-go"
20 "golang.org/x/net/context"
2121
2222 "github.com/go-kit/kit/endpoint"
2323 "github.com/go-kit/kit/examples/addsvc"
00 package main
11
22 import (
3 "context"
34 "flag"
45 "fmt"
56 "net/http"
67 "os"
78 "os/signal"
89 "syscall"
9
10 "golang.org/x/net/context"
1110
1211 "github.com/go-kit/kit/examples/profilesvc"
1312 "github.com/go-kit/kit/log"
00 package profilesvc
11
22 import (
3 "context"
34 "net/url"
45 "strings"
5
6 "golang.org/x/net/context"
76
87 "github.com/go-kit/kit/endpoint"
98 httptransport "github.com/go-kit/kit/transport/http"
00 package profilesvc
11
22 import (
3 "context"
34 "time"
4
5 "golang.org/x/net/context"
65
76 "github.com/go-kit/kit/log"
87 )
00 package profilesvc
11
22 import (
3 "context"
34 "errors"
45 "sync"
5
6 "golang.org/x/net/context"
76 )
87
98 // Service is a simple CRUD interface for user profiles.
33
44 import (
55 "bytes"
6 "context"
67 "encoding/json"
78 "errors"
89 "io/ioutil"
910 "net/http"
10
1111 "net/url"
1212
1313 "github.com/gorilla/mux"
14 "golang.org/x/net/context"
1514
1615 "github.com/go-kit/kit/log"
1716 httptransport "github.com/go-kit/kit/transport/http"
00 package booking
11
22 import (
3 "context"
34 "time"
4
5 "golang.org/x/net/context"
65
76 "github.com/go-kit/kit/endpoint"
87
00 package booking
11
22 import (
3 "context"
34 "encoding/json"
45 "errors"
56 "net/http"
67 "time"
78
89 "github.com/gorilla/mux"
9 "golang.org/x/net/context"
1010
1111 kitlog "github.com/go-kit/kit/log"
1212 kithttp "github.com/go-kit/kit/transport/http"
00 package handling
11
22 import (
3 "context"
34 "time"
4
5 "golang.org/x/net/context"
65
76 "github.com/go-kit/kit/endpoint"
87
00 package handling
11
22 import (
3 "context"
34 "encoding/json"
45 "net/http"
56 "time"
67
78 "github.com/gorilla/mux"
8 "golang.org/x/net/context"
99
1010 kitlog "github.com/go-kit/kit/log"
1111 kithttp "github.com/go-kit/kit/transport/http"
00 // Package inspection provides means to inspect cargos.
11 package inspection
22
3 import "github.com/go-kit/kit/examples/shipping/cargo"
3 import (
4 "github.com/go-kit/kit/examples/shipping/cargo"
5 )
46
57 // EventHandler provides means of subscribing to inspection events.
68 type EventHandler interface {
00 // Package location provides the Location aggregate.
11 package location
22
3 import "errors"
3 import (
4 "errors"
5 )
46
57 // UNLocode is the United Nations location code that uniquely identifies a
68 // particular location.
00 package main
11
22 import (
3 "context"
34 "flag"
45 "fmt"
56 "net/http"
1011 "time"
1112
1213 stdprometheus "github.com/prometheus/client_golang/prometheus"
13 "golang.org/x/net/context"
1414
1515 "github.com/go-kit/kit/log"
1616 kitprometheus "github.com/go-kit/kit/metrics/prometheus"
00 package routing
11
22 import (
3 "context"
34 "encoding/json"
45 "net/http"
56 "net/url"
67 "time"
7
8 "golang.org/x/net/context"
98
109 "github.com/go-kit/kit/circuitbreaker"
1110 "github.com/go-kit/kit/endpoint"
22 // bounded context.
33 package routing
44
5 import "github.com/go-kit/kit/examples/shipping/cargo"
5 import (
6 "github.com/go-kit/kit/examples/shipping/cargo"
7 )
68
79 // Service provides access to an external routing service.
810 type Service interface {
00 package tracking
11
22 import (
3 "golang.org/x/net/context"
3 "context"
44
55 "github.com/go-kit/kit/endpoint"
66 )
00 package tracking
11
22 import (
3 "context"
34 "encoding/json"
45 "errors"
56 "net/http"
67
78 "github.com/gorilla/mux"
8 "golang.org/x/net/context"
99
1010 kitlog "github.com/go-kit/kit/log"
1111 kithttp "github.com/go-kit/kit/transport/http"
00 package main
11
22 import (
3 "context"
34 "encoding/json"
45 "errors"
56 "log"
67 "net/http"
78 "strings"
8
9 "golang.org/x/net/context"
109
1110 "github.com/go-kit/kit/endpoint"
1211 httptransport "github.com/go-kit/kit/transport/http"
00 package main
11
22 import (
3 "context"
34 "net/http"
45 "os"
56
67 stdprometheus "github.com/prometheus/client_golang/prometheus"
7 "golang.org/x/net/context"
88
99 "github.com/go-kit/kit/log"
1010 kitprometheus "github.com/go-kit/kit/metrics/prometheus"
00 package main
11
22 import (
3 "context"
34 "encoding/json"
45 "net/http"
5
6 "golang.org/x/net/context"
76
87 "github.com/go-kit/kit/endpoint"
98 )
00 package main
11
22 import (
3 "context"
34 "flag"
45 "net/http"
56 "os"
67
78 stdprometheus "github.com/prometheus/client_golang/prometheus"
8 "golang.org/x/net/context"
99
1010 "github.com/go-kit/kit/log"
1111 kitprometheus "github.com/go-kit/kit/metrics/prometheus"
00 package main
11
22 import (
3 "context"
34 "errors"
45 "fmt"
56 "net/url"
89
910 jujuratelimit "github.com/juju/ratelimit"
1011 "github.com/sony/gobreaker"
11 "golang.org/x/net/context"
1212
1313 "github.com/go-kit/kit/circuitbreaker"
1414 "github.com/go-kit/kit/endpoint"
11
22 import (
33 "bytes"
4 "context"
45 "encoding/json"
56 "io/ioutil"
67 "net/http"
7
8 "golang.org/x/net/context"
98
109 "github.com/go-kit/kit/endpoint"
1110 )
00 package ratelimit
11
22 import (
3 "context"
34 "errors"
45 "time"
56
67 "github.com/juju/ratelimit"
7 "golang.org/x/net/context"
88
99 "github.com/go-kit/kit/endpoint"
1010 )
00 package ratelimit_test
11
22 import (
3 "context"
34 "math"
45 "testing"
56 "time"
67
78 jujuratelimit "github.com/juju/ratelimit"
8 "golang.org/x/net/context"
99
1010 "github.com/go-kit/kit/endpoint"
1111 "github.com/go-kit/kit/ratelimit"
00 package consul
11
2 import consul "github.com/hashicorp/consul/api"
2 import (
3 consul "github.com/hashicorp/consul/api"
4 )
35
46 // Client is a wrapper around the Consul API.
57 type Client interface {
00 package consul
11
22 import (
3 "context"
34 "errors"
45 "io"
56 "reflect"
67 "testing"
78
89 stdconsul "github.com/hashicorp/consul/api"
9 "golang.org/x/net/context"
1010
1111 "github.com/go-kit/kit/endpoint"
1212 )
00 package consul
11
22 import (
3 "context"
34 "testing"
45
56 consul "github.com/hashicorp/consul/api"
6 "golang.org/x/net/context"
77
88 "github.com/go-kit/kit/log"
99 )
00 package etcd
11
22 import (
3 "context"
34 "crypto/tls"
45 "crypto/x509"
56 "errors"
910 "time"
1011
1112 etcd "github.com/coreos/etcd/client"
12 "golang.org/x/net/context"
1313 )
1414
1515 var (
00 package etcd
11
22 import (
3 "context"
34 "errors"
45 "reflect"
56 "testing"
67 "time"
78
89 etcd "github.com/coreos/etcd/client"
9 "golang.org/x/net/context"
1010 )
1111
1212 func TestNewClient(t *testing.T) {
00 package etcd
11
22 import (
3 "context"
34 "io"
45 "time"
5
6 "golang.org/x/net/context"
76
87 "github.com/go-kit/kit/endpoint"
98 "github.com/go-kit/kit/log"
22 package etcd
33
44 import (
5 "context"
56 "io"
67 "os"
78 "testing"
89 "time"
9
10 "golang.org/x/net/context"
1110
1211 "github.com/go-kit/kit/endpoint"
1312 "github.com/go-kit/kit/log"
00 package lb
11
22 import (
3 "context"
34 "math"
45 "testing"
56
67 "github.com/go-kit/kit/endpoint"
78 "github.com/go-kit/kit/sd"
8 "golang.org/x/net/context"
99 )
1010
1111 func TestRandom(t *testing.T) {
00 package lb
11
22 import (
3 "context"
34 "fmt"
45 "strings"
56 "time"
6
7 "golang.org/x/net/context"
87
98 "github.com/go-kit/kit/endpoint"
109 )
00 package lb_test
11
22 import (
3 "context"
34 "errors"
45 "testing"
56 "time"
6
7 "golang.org/x/net/context"
87
98 "github.com/go-kit/kit/endpoint"
109 "github.com/go-kit/kit/sd"
00 package lb
11
22 import (
3 "context"
34 "reflect"
45 "sync"
56 "sync/atomic"
67 "testing"
78 "time"
8
9 "golang.org/x/net/context"
109
1110 "github.com/go-kit/kit/endpoint"
1211 "github.com/go-kit/kit/sd"
00 package zk
11
22 import (
3 "context"
34 "errors"
45 "fmt"
56 "io"
78 "time"
89
910 "github.com/samuel/go-zookeeper/zk"
10 "golang.org/x/net/context"
1111
1212 "github.com/go-kit/kit/endpoint"
1313 "github.com/go-kit/kit/log"
00 package opentracing
11
22 import (
3 "context"
4
35 "github.com/opentracing/opentracing-go"
46 otext "github.com/opentracing/opentracing-go/ext"
5 "golang.org/x/net/context"
67
78 "github.com/go-kit/kit/endpoint"
89 )
00 package opentracing_test
11
22 import (
3 "context"
34 "testing"
45
56 "github.com/opentracing/opentracing-go"
67 "github.com/opentracing/opentracing-go/mocktracer"
7 "golang.org/x/net/context"
88
99 "github.com/go-kit/kit/endpoint"
1010 kitot "github.com/go-kit/kit/tracing/opentracing"
00 package opentracing
11
22 import (
3 "context"
34 "encoding/base64"
45 "strings"
56
67 "github.com/opentracing/opentracing-go"
78 "github.com/opentracing/opentracing-go/ext"
8 "golang.org/x/net/context"
99 "google.golang.org/grpc/metadata"
1010
1111 "github.com/go-kit/kit/log"
00 package opentracing_test
11
22 import (
3 "context"
34 "testing"
45
56 "github.com/opentracing/opentracing-go"
67 "github.com/opentracing/opentracing-go/mocktracer"
7 "golang.org/x/net/context"
88 "google.golang.org/grpc/metadata"
99
1010 "github.com/go-kit/kit/log"
00 package opentracing
11
22 import (
3 "context"
34 "net"
45 "net/http"
56 "strconv"
67
78 "github.com/opentracing/opentracing-go"
89 "github.com/opentracing/opentracing-go/ext"
9 "golang.org/x/net/context"
1010
1111 "github.com/go-kit/kit/log"
1212 kithttp "github.com/go-kit/kit/transport/http"
00 package opentracing_test
11
22 import (
3 "context"
34 "net/http"
45 "reflect"
56 "testing"
78 "github.com/opentracing/opentracing-go"
89 "github.com/opentracing/opentracing-go/ext"
910 "github.com/opentracing/opentracing-go/mocktracer"
10 "golang.org/x/net/context"
1111
1212 "github.com/go-kit/kit/log"
1313 kitot "github.com/go-kit/kit/tracing/opentracing"
00 package grpc
11
22 import (
3 "context"
34 "fmt"
45 "reflect"
56 "strings"
67
7 "golang.org/x/net/context"
88 "google.golang.org/grpc"
99 "google.golang.org/grpc/metadata"
1010
00 package grpc
11
2 import "golang.org/x/net/context"
2 import (
3 "context"
4 )
35
46 // DecodeRequestFunc extracts a user-domain request object from a gRPC request.
57 // It's designed to be used in gRPC servers, for server-side endpoints. One
00 package grpc
11
22 import (
3 "context"
34 "encoding/base64"
45 "strings"
56
6 "golang.org/x/net/context"
77 "google.golang.org/grpc/metadata"
88 )
99
00 package grpc
11
22 import (
3 "golang.org/x/net/context"
3 "context"
4
45 "google.golang.org/grpc/metadata"
56
67 "github.com/go-kit/kit/endpoint"
11
22 import (
33 "bytes"
4 "context"
45 "encoding/json"
56 "io/ioutil"
67 "net/http"
78 "net/url"
89
9 "golang.org/x/net/context"
1010 "golang.org/x/net/context/ctxhttp"
1111
1212 "github.com/go-kit/kit/endpoint"
00 package http_test
11
22 import (
3 "context"
34 "io"
45 "io/ioutil"
56 "net/http"
78 "net/url"
89 "testing"
910 "time"
10
11 "golang.org/x/net/context"
1211
1312 httptransport "github.com/go-kit/kit/transport/http"
1413 )
00 package http
11
22 import (
3 "context"
34 "net/http"
4
5 "golang.org/x/net/context"
65 )
76
87 // DecodeRequestFunc extracts a user-domain request object from an HTTP
00 package http
11
22 import (
3 "context"
34 "fmt"
45 "net/http"
56 "net/http/httptest"
6
7 "golang.org/x/net/context"
87 )
98
109 func ExamplePopulateRequestContext() {
00 package http
11
22 import (
3 "context"
34 "net/http"
4
5 "golang.org/x/net/context"
65 )
76
87 // RequestFunc may take information from an HTTP request and put it into a
00 package http_test
11
22 import (
3 "context"
34 "net/http/httptest"
45 "testing"
5
6 "golang.org/x/net/context"
76
87 httptransport "github.com/go-kit/kit/transport/http"
98 )
00 package http
11
22 import (
3 "context"
34 "encoding/json"
45 "net/http"
5
6 "golang.org/x/net/context"
76
87 "github.com/go-kit/kit/endpoint"
98 "github.com/go-kit/kit/log"
00 package http_test
11
22 import (
3 "context"
34 "errors"
45 "io/ioutil"
56 "net/http"
67 "net/http/httptest"
78 "strings"
89 "testing"
9
10 "golang.org/x/net/context"
1110
1211 "github.com/go-kit/kit/endpoint"
1312 httptransport "github.com/go-kit/kit/transport/http"
00 package httprp
11
22 import (
3 "context"
34 "net/http"
45 "net/http/httputil"
56 "net/url"
6
7 "golang.org/x/net/context"
87 )
98
109 // RequestFunc may take information from an HTTP request and put it into a
00 package httprp_test
11
22 import (
3 "context"
34 "io/ioutil"
45 "net/http"
56 "net/http/httptest"
67 "net/url"
78 "testing"
8
9 "golang.org/x/net/context"
109
1110 httptransport "github.com/go-kit/kit/transport/httprp"
1211 )