server

package
v0.0.0-...-aaea8e4 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 25 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GatewayHandlerFunc

type GatewayHandlerFunc func(ctx context.Context, mux *pkgruntime.ServeMux, conn *grpc.ClientConn) error

type HTTPGatewayServer

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

func NewHTTPGatewayServer

func NewHTTPGatewayServer(g *grpcserver.GrpcServer, log logger.Logger, port int, optFuncs ...HTTPGatewayServerConfigOption) (*HTTPGatewayServer, error)

func (*HTTPGatewayServer) AddRoutes

func (h *HTTPGatewayServer) AddRoutes(routes ...*Route) error

func (*HTTPGatewayServer) ListenAndServe

func (h *HTTPGatewayServer) ListenAndServe() error

func (*HTTPGatewayServer) RegisterHandlers

func (h *HTTPGatewayServer) RegisterHandlers(handlerfuncs ...GatewayHandlerFunc) error

func (*HTTPGatewayServer) Shutdown

func (h *HTTPGatewayServer) Shutdown(ctx context.Context) error

func (*HTTPGatewayServer) WaitForSIGTERM

func (h *HTTPGatewayServer) WaitForSIGTERM() error

type HTTPGatewayServerConfig

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

type HTTPGatewayServerConfigOption

type HTTPGatewayServerConfigOption func(c *HTTPGatewayServerConfig)

func WithHttpMiddlewares

func WithHttpMiddlewares(middlewares ...HttpMiddlewareHandler) HTTPGatewayServerConfigOption

func WithServeMuxOption

func WithServeMuxOption(serveMuxOpts ...pkgruntime.ServeMuxOption) HTTPGatewayServerConfigOption

type HttpMiddlewareHandler

type HttpMiddlewareHandler func(h http.Handler) http.Handler

type Route

type Route struct {
	Pattern string
	Handler http.Handler
}

func NewOpenAPIV2Route

func NewOpenAPIV2Route(prefix string, handler http.Handler) *Route

func NewSwaggerRoute

func NewSwaggerRoute() *Route

Jump to

Keyboard shortcuts

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