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 jsonrpc.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, otTracer stdopentracing.Tracer, zipkinTracer *stdzipkin.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, otTracer stdopentracing.Tracer, zipkinTracer *stdzipkin.Tracer, logger log.Logger) pb.AddServer

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

func NewHTTPClient Uses

func NewHTTPClient(instance string, otTracer stdopentracing.Tracer, zipkinTracer *stdzipkin.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, otTracer stdopentracing.Tracer, zipkinTracer *stdzipkin.Tracer, logger log.Logger) http.Handler

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

func NewJSONRPCClient Uses

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

NewJSONRPCClient returns an addservice backed by a JSON RPC over 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 NewJSONRPCHandler Uses

func NewJSONRPCHandler(endpoints addendpoint.Set, logger log.Logger) *jsonrpc.Server

NewJSONRPCHandler returns a JSON RPC Server/Handler that can be passed to http.Handle()

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 29 packages (graph) and is imported by 1 packages. Updated 2018-03-15. Refresh now. Tools for package owners.