grpc

package
v0.0.5-0...-8e55a6f Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PatchOpts

func PatchOpts(l log.Logger, opts []grpc.ServerOption, server *conf.Server) []grpc.ServerOption

PatchOpts Patch grpc options with given service name and configs

Types

type Server

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

func NewServer

func NewServer(cfg *conf.Server, opts ...grpc.ServerOption) *Server

func (*Server) Endpoint

func (s *Server) Endpoint() (url *url.URL, err error)

type ServiceRegister

type ServiceRegister interface {
	Register(server *grpc.Server, middleware ...middleware.Middleware)
}

ServiceRegister register grpc handler into grpc server

func ChainServiceRegister

func ChainServiceRegister(r ...ServiceRegister) ServiceRegister

type ServiceRegisterFunc

type ServiceRegisterFunc func(server *grpc.Server, middleware ...middleware.Middleware)

func (ServiceRegisterFunc) Register

func (f ServiceRegisterFunc) Register(server *grpc.Server, middleware ...middleware.Middleware)

Jump to

Keyboard shortcuts

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