// Code generated by protoc-gen-go-micro. DO NOT EDIT. // protoc-gen-go-micro version: v4.0.0 // source: service.proto package servicepb import ( context "context" proto "go.unistack.org/micro-logger-service/v3/proto" client "go.unistack.org/micro/v4/client" server "go.unistack.org/micro/v4/server" ) type loggerServiceClient struct { c client.Client name string } func NewLoggerServiceClient(name string, c client.Client) LoggerServiceClient { return &loggerServiceClient{c: c, name: name} } func (c *loggerServiceClient) Log(ctx context.Context, req *proto.LogReq, opts ...client.CallOption) (*proto.LogRsp, error) { rsp := &proto.LogRsp{} err := c.c.Call(ctx, c.c.NewRequest(c.name, "LoggerService.Log", req), rsp, opts...) if err != nil { return nil, err } return rsp, nil } type loggerServiceServer struct { LoggerServiceServer } func (h *loggerServiceServer) Log(ctx context.Context, req *proto.LogReq, rsp *proto.LogRsp) error { return h.LoggerServiceServer.Log(ctx, req, rsp) } func RegisterLoggerServiceServer(s server.Server, sh LoggerServiceServer, opts ...server.HandlerOption) error { type loggerService interface { Log(ctx context.Context, req *proto.LogReq, rsp *proto.LogRsp) error } type LoggerService struct { loggerService } h := &loggerServiceServer{sh} var nopts []server.HandlerOption return s.Handle(s.NewHandler(&LoggerService{h}, append(nopts, opts...)...)) }