srpc

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGrpcServer

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

NewGrpcServer creates a new grpc server.

Types

type GatewayServer

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

GatewayServer is the struct for the gateway server.

func NewGatewayServer

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

NewGatewayServer creates a new gateway server.

func (*GatewayServer) Endpoint

func (gs *GatewayServer) Endpoint() string

Endpoint returns the endpoint.

func (*GatewayServer) GatewayOption

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

GatewayOption returns the gateway option.

func (*GatewayServer) GatewayRuntimeMux

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

GatewayRuntimeMux returns the gateway runtime mux.

func (*GatewayServer) GatewayServer

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

GatewayServer returns the gateway server.

func (*GatewayServer) StartServing

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

StartServing starts the gateway server.

func (*GatewayServer) StopServing

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

StopServing stops the gateway server.

type GrpcServer

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

GrpcServer is the struct for the grpc server.

func (*GrpcServer) GrpcServer

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

GrpcServer returns the grpc server.

func (*GrpcServer) StartServing

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

StartServing starts the grpc server.

func (*GrpcServer) StopServing

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

StopServing stops the grpc server.

Jump to

Keyboard shortcuts

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