srpc

package
v0.0.31 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2024 License: MIT Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Matcher

func Matcher(key string) (string, bool)

func NewGrpcServer

func NewGrpcServer(
	logger *zap.Logger,
	listener net.Listener,
	auth siface.IAuth,
	deployment string,
	rateLimit int32,
	opts ...grpc.ServerOption,
) (result siface.IGrpcServer, err error)

Types

type GatewayServer

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

func NewGatewayServer

func NewGatewayServer(
	logger *zap.Logger,
	listener net.Listener,
) (result *GatewayServer, err error)

func (*GatewayServer) Endpoint

func (gs *GatewayServer) Endpoint() string

func (*GatewayServer) GatewayOption

func (gs *GatewayServer) GatewayOption() []grpc.DialOption

func (*GatewayServer) GatewayRuntimeMux

func (gs *GatewayServer) GatewayRuntimeMux() *runtime.ServeMux

func (*GatewayServer) GatewayServer

func (gs *GatewayServer) GatewayServer() *http.Server

func (*GatewayServer) StartServing

func (gs *GatewayServer) StartServing(_ context.Context) error

func (*GatewayServer) StopServing

func (gs *GatewayServer) StopServing(ctx context.Context) error

type GrpcServer

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

func (*GrpcServer) GrpcServer

func (gs *GrpcServer) GrpcServer() *grpc.Server

func (*GrpcServer) StartServing

func (gs *GrpcServer) StartServing(_ context.Context) error

func (*GrpcServer) StopServing

func (gs *GrpcServer) StopServing(_ context.Context) error

type TestGrpcServer

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

func (*TestGrpcServer) GrpcServer

func (s *TestGrpcServer) GrpcServer() *grpc.Server

func (*TestGrpcServer) StartServing

func (s *TestGrpcServer) StartServing(_ context.Context) error

func (*TestGrpcServer) StopServing

func (s *TestGrpcServer) StopServing(_ context.Context) error

Jump to

Keyboard shortcuts

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