addtransport

package
v0.10.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 17, 2020 License: MIT Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeThriftConcatEndpoint

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

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

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

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

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

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 added in v0.7.0

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 added in v0.7.0

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

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

func NewThriftServer(endpoints addendpoint.Set) addthrift.AddService

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

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL