Package list golang-github-go-kit-kit / 76e141a
fix(transport/grpc): remove autoprefixing logic Removes the autoprefixing of "pb" to service names, to allow for grpc services created without a package prefix. Fixes #447. BREAKING CHANGE: Existing users of the grpc client transport who were relying on the autoprefixing of the "pb" package name must manually update their clients to add it. No change is required if a package name was already being manually prefixed. Terin Stock 4 years ago
2 changed file(s) with 2 addition(s) and 6 deletion(s). Raw diff Collapse all Expand all
3333 {
3434 sumEndpoint = grpctransport.NewClient(
3535 conn,
36 "Add",
36 "pb.Add",
3737 "Sum",
3838 addsvc.EncodeGRPCSumRequest,
3939 addsvc.DecodeGRPCSumResponse,
5252 {
5353 concatEndpoint = grpctransport.NewClient(
5454 conn,
55 "Add",
55 "pb.Add",
5656 "Concat",
5757 addsvc.EncodeGRPCConcatRequest,
5858 addsvc.DecodeGRPCConcatResponse,
33 "context"
44 "fmt"
55 "reflect"
6 "strings"
76
87 "google.golang.org/grpc"
98 "google.golang.org/grpc/metadata"
3635 grpcReply interface{},
3736 options ...ClientOption,
3837 ) *Client {
39 if strings.IndexByte(serviceName, '.') == -1 {
40 serviceName = "pb." + serviceName
41 }
4238 c := &Client{
4339 client: cc,
4440 method: fmt.Sprintf("/%s/%s", serviceName, method),