xgrpc

package
v0.0.0-...-b804f52 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2023 License: MulanPSL-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const ModName = "server.xgrpc"

Variables

This section is empty.

Functions

func StreamInterceptorChain

func StreamInterceptorChain(interceptors ...grpc.StreamServerInterceptor) grpc.StreamServerInterceptor

func UnaryInterceptorChain

func UnaryInterceptorChain(interceptors ...grpc.UnaryServerInterceptor) grpc.UnaryServerInterceptor

Types

type Config

type Config struct {
	Addr                      string
	Network                   string
	SlowQueryThresholdInMilli time.Duration
	// contains filtered or unexported fields
}

Config ...

func DefaultConfig

func DefaultConfig() *Config

DefaultConfig represents default config User should construct config base on DefaultConfig

type Server

type Server struct {
	*grpc.Server
	// contains filtered or unexported fields
}

Server ...

func Build

func Build() *Server

func (*Server) GracefulStop

func (s *Server) GracefulStop(_ context.Context) error

func (*Server) Info

func (s *Server) Info() *server.ServiceInfo

func (*Server) Serve

func (s *Server) Serve() error

func (*Server) Stop

func (s *Server) Stop() error

Jump to

Keyboard shortcuts

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