server

package
v0.0.0-...-a58579d Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithHttpMiddlewares

func WithHttpMiddlewares(middlewares ...HttpMiddlewareHandler) httpMiddlewares

func WithLogger

func WithLogger(log logger.Logger) withLog

func WithServeMuxOption

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

func WithTransportCredentials

func WithTransportCredentials(tc credentials.TransportCredentials) clientTransportCredentials

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, configurers ...HttpGatewayServerConfigurer) (*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)

type HttpGatewayServerConfigurer

type HttpGatewayServerConfigurer interface {
	// contains filtered or unexported methods
}

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