123456789101112131415161718192021222324252627 |
- package client
- import (
- grpctransport "github.com/go-kit/kit/transport/grpc"
- kitgrpc "github.com/go-kit/kit/transport/grpc"
- "github.com/longjoy/micro-go-course/section35/zipkin-kit/pb"
- endpts "github.com/longjoy/micro-go-course/section35/zipkin-kit/string-service/endpoint"
- "github.com/longjoy/micro-go-course/section35/zipkin-kit/string-service/service"
- "google.golang.org/grpc"
- )
- func StringDiff(conn *grpc.ClientConn, clientTracer kitgrpc.ClientOption) service.Service {
- var ep = grpctransport.NewClient(conn,
- "pb.StringService",
- "Diff",
- EncodeGRPCStringRequest,
- DecodeGRPCStringResponse,
- pb.StringResponse{},
- clientTracer,
- ).Endpoint()
- StringEp := endpts.StringEndpoints{
- StringEndpoint: ep,
- }
- return StringEp
- }
|