src

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2022 License: Apache-2.0 Imports: 15 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeLoginEndPoint

func MakeLoginEndPoint(s Service) endpoint.Endpoint

func NewGRPCServer

func NewGRPCServer(endpoint EndPointServer, log *zap.Logger) pb.UserServer

func NewGolangRateAllowMiddleware

func NewGolangRateAllowMiddleware(limit *rate.Limiter) endpoint.Middleware

func NewTracerEndpointMiddleware

func NewTracerEndpointMiddleware(tracer opentracing.Tracer) endpoint.Middleware

func RequestGrpcLogin

func RequestGrpcLogin(_ context.Context, grpcReq interface{}) (interface{}, error)

func ResponseGrpcLogin

func ResponseGrpcLogin(_ context.Context, response interface{}) (interface{}, error)

Types

type EndPointServer

type EndPointServer struct {
	LoginEndPoint endpoint.Endpoint
}

func NewEndPointServer

func NewEndPointServer(svc Service, limit *rate.Limiter, tracer opentracing.Tracer) EndPointServer

func (EndPointServer) Login

func (s EndPointServer) Login(ctx context.Context, in *pb.Login) (*pb.LoginAck, error)

type NewMiddlewareServer

type NewMiddlewareServer func(Service) Service

func NewLogMiddlewareServer

func NewLogMiddlewareServer(log *zap.Logger) NewMiddlewareServer

func NewMetricsMiddlewareServer

func NewMetricsMiddlewareServer(counter metrics.Counter, histogram metrics.Histogram) NewMiddlewareServer

func NewTracerMiddlewareServer

func NewTracerMiddlewareServer(tracer opentracing.Tracer) NewMiddlewareServer

type Service

type Service interface {
	Login(ctx context.Context, in *pb.Login) (ack *pb.LoginAck, err error)
}

func NewService

func NewService(log *zap.Logger, counter metrics.Counter, histogram metrics.Histogram, tracer opentracing.Tracer) Service

Jump to

Keyboard shortcuts

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