grpcsrv

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2024 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ListenAndServe

func ListenAndServe(s *grpc.Server, bind string) error

func NewGrpcServer

func NewGrpcServer(excludePath []string, auth grpcauth.AuthFunc) *grpc.Server

func StdRegister

func StdRegister(s *grpc.Server)

StdRegister registers reflection and prometheus services.

func StdStreamMiddleware

func StdStreamMiddleware(interceptors ...grpc.StreamServerInterceptor) grpc.ServerOption

func StdUnaryMiddleware

func StdUnaryMiddleware(interceptors ...grpc.UnaryServerInterceptor) grpc.ServerOption

func StreamReflectionFilter

func StreamReflectionFilter(exclude []string, in grpc.StreamServerInterceptor) grpc.StreamServerInterceptor

func UnaryReflectionFilter

func UnaryReflectionFilter(exclude []string, in grpc.UnaryServerInterceptor) grpc.UnaryServerInterceptor

Types

type Auth

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

func NewAuthInterceptor

func NewAuthInterceptor(subs SubscriberProvider) *Auth

func (*Auth) AuthAndIdentifyTickerFunc

func (a *Auth) AuthAndIdentifyTickerFunc(ctx context.Context) (context.Context, error)

type GrpcServerWorker

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

func NewGrpcServerWorker

func NewGrpcServerWorker(name string, grpcServer *grpc.Server, bind string) *GrpcServerWorker

func (*GrpcServerWorker) Start

func (g *GrpcServerWorker) Start() error

func (*GrpcServerWorker) Stop

func (g *GrpcServerWorker) Stop() error

type SubscriberProvider

type SubscriberProvider interface {
	GetByID(_ context.Context, id uuid.UUID) (*subscriber.Subscriber, error)
}

Jump to

Keyboard shortcuts

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