server

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddHandlerFunc

type AddHandlerFunc func(http.Handler) http.Handler

AddHandlerFunc type for add handler

type ClientRegisterFunc

type ClientRegisterFunc func(gwmux *runtime.ServeMux) error

ClientRegisterFunc injector function for runtime.ServeMux register

type GrpcGatewayServer

type GrpcGatewayServer struct {
	Handler http.Handler
	Server  *http.Server
	// contains filtered or unexported fields
}

GrpcGatewayServer server object

func NewGrpcGatewayServer

func NewGrpcGatewayServer(name string) *GrpcGatewayServer

NewGrpcGatewayServer constructor

func (*GrpcGatewayServer) Serve

func (s *GrpcGatewayServer) Serve(host string, port int) (err error)

Serve run server

func (*GrpcGatewayServer) WithClientRegister

func (s *GrpcGatewayServer) WithClientRegister(handler ClientRegisterFunc) *GrpcGatewayServer

WithClientRegister injection method for gRPC client registration

func (*GrpcGatewayServer) WithHandlers

func (s *GrpcGatewayServer) WithHandlers(handlerFuncs ...AddHandlerFunc) *GrpcGatewayServer

WithHandlers add handler

type GrpcServer

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

GrpcServer server object

func NewGrpcServer

func NewGrpcServer(name string) *GrpcServer

NewGrpcServer constructor

func (*GrpcServer) ServeTCP

func (s *GrpcServer) ServeTCP(host string, port int) (err error)

ServeTCP run server in TCP

func (*GrpcServer) WithOptions

func (s *GrpcServer) WithOptions(options ...grpc.ServerOption) *GrpcServer

WithOptions injection method for gRPC server options, middlewares,...

func (*GrpcServer) WithRegister

func (s *GrpcServer) WithRegister(handler RegisterFunc) *GrpcServer

WithRegister injection method for gRPC server registration

type RegisterFunc

type RegisterFunc func(server *grpc.Server) error

RegisterFunc registering handler type

Jump to

Keyboard shortcuts

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