transports

package
v0.0.0-...-dd0ccd7 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2022 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeGRPCServer

func MakeGRPCServer(endpoints endpoints.Endpoints, otTracer stdopentracing.Tracer, zipkinTracer *stdzipkin.Tracer, logger log.Logger) (req pb.TodoServer)

MakeGRPCServer makes a set of endpoints available as a gRPC server.

func ModelReqToPB

func ModelReqToPB(todo *model.TodoReq) *pb.ModelTodoReq

func ModelResToPB

func ModelResToPB(todo *model.TodoRes) *pb.ModelTodoRes

func NewGRPCClient

func NewGRPCClient(conn *grpc.ClientConn, otTracer stdopentracing.Tracer, zipkinTracer *stdzipkin.Tracer, logger log.Logger) service.TodoService

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 PBtoModelReq

func PBtoModelReq(todo *pb.ModelTodoReq) *model.TodoReq

func PBtoModelRes

func PBtoModelRes(todo *pb.ModelTodoRes) *model.TodoRes

Types

This section is empty.

Jump to

Keyboard shortcuts

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