grpc

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2024 License: CC0-1.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MetricsUnaryInterceptor

func MetricsUnaryInterceptor(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error)

func UnaryServerPanicInterceptor

func UnaryServerPanicInterceptor(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (resp interface{}, err error)

Types

type GRPCServer

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

func New

func New(o *Options) *GRPCServer

func (*GRPCServer) CatchSignal

func (gs *GRPCServer) CatchSignal(s os.Signal)

func (*GRPCServer) MustStart

func (gs *GRPCServer) MustStart()

func (*GRPCServer) Register

func (gs *GRPCServer) Register(fn interface{}, server interface{})

func (*GRPCServer) Start

func (gs *GRPCServer) Start() error

func (*GRPCServer) Stop

func (gs *GRPCServer) Stop()

func (*GRPCServer) StopContext

func (gs *GRPCServer) StopContext(ctx context.Context)

type Options

type Options struct {
	Address                      string
	UnaryInterceptors            []grpc.UnaryServerInterceptor
	SkipRegisterReflectionServer bool
}

Jump to

Keyboard shortcuts

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