handler

package
v0.0.0-...-54bb499 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2019 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	Broker broker.Broker
	// contains filtered or unexported fields
}

微服务服务端 struct handler 必须实现 protobuf 中定义的 rpc 方法 实现方法的传参等可参考生成的 consignment.pb.go

func GetHandler

func GetHandler(session *mgo.Session, vesselClient vesselPb.VesselServiceClient, userClient userPb.UserServiceClient, bk broker.Broker) *Handler

func (*Handler) CreateConsignment

func (h *Handler) CreateConsignment(ctx context.Context, req *pb.Consignment, resp *pb.Response) error

func (*Handler) GetConsignments

func (h *Handler) GetConsignments(ctx context.Context, req *pb.GetRequest, resp *pb.Response) error

func (*Handler) GetRepo

func (h *Handler) GetRepo() model.Repository

从主会话中 Clone() 出新会话处理查询

Jump to

Keyboard shortcuts

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