grpc

package
v0.29.0 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package grpc implements an gRPC server.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RecoverServerInterceptor added in v0.7.0

func RecoverServerInterceptor(logger tracelog.Logger) grpc.UnaryServerInterceptor

RecoverServerInterceptor returns recovery grpc interceptor.

func SimpleErrorServerInterceptor added in v0.2.0

func SimpleErrorServerInterceptor() grpc.UnaryServerInterceptor

SimpleErrorServerInterceptor returns error parser grpc interceptor.

Types

type Server

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

A Server defines configuration for running an gRPC server.

func NewServer

func NewServer(port uint16) *Server

NewServer returns gRPC server with port.

func NewServerWithListener added in v0.7.0

func NewServerWithListener(listener net.Listener) *Server

NewServerWithListener returns gRPC server with listener.

func (*Server) Addr

func (s *Server) Addr() string

Addr returns the server address.

func (*Server) BuildServer added in v0.2.0

func (s *Server) BuildServer(tlsConfig *tls.Config, opts []grpc.ServerOption) (err error)

BuildServer init gRPC server.

func (*Server) Close

func (s *Server) Close() error

Close closes the server.

func (*Server) IsPresent added in v0.27.0

func (s *Server) IsPresent() bool

func (*Server) RegistryDesc

func (s *Server) RegistryDesc(services ...transport.Service)

RegistryDesc in gRPC server.

func (*Server) Serve

func (s *Server) Serve() error

Serve starts serving incoming connections.

Jump to

Keyboard shortcuts

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