grpcserver

package
v0.0.0-...-a9153d3 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultRecoveryOptions = []grpc_recovery.Option{
	grpc_recovery.WithRecoveryHandler(func(p interface{}) (err error) {
		return status.Errorf(codes.Unknown, "panic triggered: %v", p)
	}),
}
View Source
var SignKey = ""

Functions

func GetInstance

func GetInstance() *grpc.Server

func GrpcSignCheckFunc

func GrpcSignCheckFunc(ctx context.Context) (context.Context, error)

func NewService

func NewService(sign string, backends ...Backend) *grpc.Server

NewService initializes a new grpc service

Types

type Backend

type Backend interface {
	RegisterGRPC(*grpc.Server)
}

Backend abstracts a registerable GRPC

Jump to

Keyboard shortcuts

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