Documentation ¶
Index ¶
- func MakeThriftConcatEndpoint(client *addthrift.AddServiceClient) endpoint.Endpoint
- func MakeThriftSumEndpoint(client *addthrift.AddServiceClient) endpoint.Endpoint
- func NewGRPCClient(conn *grpc.ClientConn, tracer stdopentracing.Tracer, logger log.Logger) addservice.Service
- func NewGRPCServer(endpoints addendpoint.Set, tracer stdopentracing.Tracer, logger log.Logger) pb.AddServer
- func NewHTTPClient(instance string, tracer stdopentracing.Tracer, logger log.Logger) (addservice.Service, error)
- func NewHTTPHandler(endpoints addendpoint.Set, tracer stdopentracing.Tracer, logger log.Logger) http.Handler
- func NewThriftClient(client *addthrift.AddServiceClient) addservice.Service
- func NewThriftServer(endpoints addendpoint.Set) addthrift.AddService
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, 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 ¶
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 ¶
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 ¶
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 ¶
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.