grpcserver

package
v0.0.0-...-93e8ec0 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2023 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Overview

Package grpcserver implements gRPC server.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InterceptorLogger

func InterceptorLogger(l *zap.Logger) logging.Logger

InterceptorLogger adapts zap.Logger to logging.Logger.

Types

type GRPCServer

type GRPCServer struct {
	// contains filtered or unexported fields
}

GRPCServer is a custom gRPC server with RPC requests logger.

func NewGRPCServer

func NewGRPCServer(NumPoolWorkers uint32) *GRPCServer

NewGRPCServer returns GRPCServer with the given number of goroutines for traffic processing.

func (*GRPCServer) GetServer

func (s *GRPCServer) GetServer() *grpc.Server

GetServer returns gRPC server field.

func (*GRPCServer) GracefulShutdown

func (s *GRPCServer) GracefulShutdown()

GracefulShutdown stops the gRPC server gracefully.

func (*GRPCServer) Notify

func (s *GRPCServer) Notify() <-chan error

Notify returns notify channel field.

func (*GRPCServer) StartGRPCServer

func (s *GRPCServer) StartGRPCServer(l net.Listener)

StartGRPCServer calls method for serving connection on the given listener and accepts err from it.

Jump to

Keyboard shortcuts

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