kit: github.com/go-kit/kit/examples/addsvc/pkg/addtransport Index | Files

package addtransport

import "github.com/go-kit/kit/examples/addsvc/pkg/addtransport"

Index

Package Files

grpc.go http.go thrift.go

func MakeThriftConcatEndpoint Uses

func MakeThriftConcatEndpoint(client *addthrift.AddServiceClient) endpoint.Endpoint

MakeThriftConcatEndpoint returns an endpoint that invokes the passed Thrift client. Useful only in clients, and only until a proper transport/thrift.Client exists.

func MakeThriftSumEndpoint Uses

func MakeThriftSumEndpoint(client *addthrift.AddServiceClient) endpoint.Endpoint

MakeThriftSumEndpoint returns an endpoint that invokes the passed Thrift client. Useful only in clients, and only until a proper transport/thrift.Client exists.

func NewGRPCClient Uses

func NewGRPCClient(conn *grpc.ClientConn, tracer stdopentracing.Tracer, logger log.Logger) addservice.Service

NewGRPCClient returns an AddService backed by a gRPC server at the other end of the conn. The caller is responsible for constructing the conn, and eventually closing the underlying transport. We bake-in certain middlewares, implementing the client library pattern.

func NewGRPCServer Uses

func NewGRPCServer(endpoints addendpoint.Set, tracer stdopentracing.Tracer, logger log.Logger) pb.AddServer

NewGRPCServer makes a set of endpoints available as a gRPC AddServer.

func NewHTTPClient Uses

func NewHTTPClient(instance string, tracer stdopentracing.Tracer, logger log.Logger) (addservice.Service, error)

NewHTTPClient returns an AddService backed by an HTTP server living at the remote instance. We expect instance to come from a service discovery system, so likely of the form "host:port". We bake-in certain middlewares, implementing the client library pattern.

func NewHTTPHandler Uses

func NewHTTPHandler(endpoints addendpoint.Set, tracer stdopentracing.Tracer, logger log.Logger) http.Handler

NewHTTPHandler returns an HTTP handler that makes a set of endpoints available on predefined paths.

func NewThriftClient Uses

func NewThriftClient(client *addthrift.AddServiceClient) addservice.Service

NewThriftClient returns an AddService backed by a Thrift server described by the provided client. The caller is responsible for constructing the client, and eventually closing the underlying transport. We bake-in certain middlewares, implementing the client library pattern.

func NewThriftServer Uses

func NewThriftServer(endpoints addendpoint.Set) addthrift.AddService

NewThriftServer makes a set of endpoints available as a Thrift service.

Package addtransport imports 25 packages (graph) and is imported by 2 packages. Updated 2017-07-29. Refresh now. Tools for package owners.