server

package
v0.7.4 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SimpleInterceptorLogger

func SimpleInterceptorLogger(l *log.Logger) grpc.UnaryServerInterceptor

SimpleInterceptorLogger is a simplified gRPC server request logger. For an alternative, see the example from go-grpc-middleware/interceptors/logging/examples/zap/example_test.go

Types

type Option

type Option func(*Server)

func WithSrvOpt

func WithSrvOpt(srvOpt grpc.ServerOption) Option

type Server

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

func New

func New(logger log.Logger, lis net.Listener, opts ...Option) *Server

func (*Server) RegisterService

func (s *Server) RegisterService(sd *grpc.ServiceDesc, ss interface{})

func (*Server) Start

func (s *Server) Start() error

func (*Server) Stop

func (s *Server) Stop()

Jump to

Keyboard shortcuts

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