grpc

package
v0.0.0-...-52f54c4 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2024 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GRPCContext

func GRPCContext(ctx context.Context) context.Context

func InitClient

func InitClient(ctx context.Context, efs embed.FS, conf config.Conn) (conn *grpc.ClientConn, err error)

func LogStreamClientInterceptor

func LogStreamClientInterceptor() grpc.StreamClientInterceptor

func LogStreamServiceInterceptor

func LogStreamServiceInterceptor() grpc.StreamServerInterceptor

func LogUnaryClientInterceptor

func LogUnaryClientInterceptor() grpc.UnaryClientInterceptor

func LogUnaryServiceInterceptor

func LogUnaryServiceInterceptor() grpc.UnaryServerInterceptor

func NewClient

func NewClient(ctx context.Context, conf config.GRPC, efs embed.FS) (conn *grpc.ClientConn, err error)

func RegisterDNS

func RegisterDNS(addr map[string][]string) (err error)

Types

type Server

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

func NewServer

func NewServer(ctx context.Context, conf config.GRPC, efs embed.FS) (svc *Server, err error)

func (*Server) GracefulStop

func (s *Server) GracefulStop()

func (*Server) Run

func (s *Server) Run(ctx context.Context, cancel func()) (err error)

Jump to

Keyboard shortcuts

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