grpc

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2022 License: Unlicense Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewServer

func NewServer(location *location.Location) v1.ServiceServer

NewServer for gRPC.

func Register

func Register(lc fx.Lifecycle, params RegisterParams)

Register server.

Types

type RegisterParams

type RegisterParams struct {
	fx.In

	GRPCServer *grpc.Server
	HTTPServer *shttp.Server
	GRPCConfig *sgrpc.Config
	Logger     *zap.Logger
	Tracer     opentracing.Tracer
	Location   *location.Location
}

RegisterParams for gRPC.

type Server

type Server struct {
	v1.UnimplementedServiceServer
	// contains filtered or unexported fields
}

Server for gRPC.

func (*Server) GetLocationByIP

func (s *Server) GetLocationByIP(ctx context.Context, req *v1.GetLocationByIPRequest) (*v1.GetLocationByIPResponse, error)

GetLocationByIP for gRPC.

func (*Server) GetLocationByLatLng added in v1.4.0

GetLocationByLatLng for gRPC.

Jump to

Keyboard shortcuts

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