Documentation ¶
Index ¶
- Variables
- func NewGRPCGateway() *runtime.ServeMux
- func NewHTTPServer(lc fx.Lifecycle, c config.Config, httpIn HTTPIn, st status.Manager) error
- func NewHTTPServerMux() *nhttp.ServeMux
- func Register(mux *http.ServeMux, reg *prometheus.Registry)
- func RegisterDebug(mux *http.ServeMux)
- type HTTPIn
- type Middleware
- type MiddlewareOut
Constants ¶
This section is empty.
Variables ¶
View Source
var Module = func(c config.Config) fx.Option { return fx.Options( fx.Provide(NewHTTPServerMux), fx.Invoke(NewHTTPServer), fx.Provide(NewGRPCGateway), fx.Provide(Recovery), fx.Provide(Logging), utils.MaybeProvide(JWT, c.IsSet("UseAuth")), utils.MaybeProvide(Tracing, c.IsSet("UseTracing")), utils.MaybeOption(Prometheus, c.IsSet("UsePrometheus")), utils.MaybeInvoke(RegisterDebug, c.IsSet("UseDebug")), ) }
Functions ¶
func NewGRPCGateway ¶
func NewHTTPServer ¶
func NewHTTPServerMux ¶
func RegisterDebug ¶
Types ¶
type MiddlewareOut ¶
type MiddlewareOut struct { fx.Out Mware Middleware `group:"httpmiddleware"` }
func CORS ¶
func CORS() MiddlewareOut
func JWT ¶
func JWT(jm auth.JWTManager, am auth.ACL) MiddlewareOut
func Logging ¶
func Logging() MiddlewareOut
func PromMware ¶
func PromMware() MiddlewareOut
func Recovery ¶
func Recovery() MiddlewareOut
func Tracing ¶
func Tracing(tracer opentracing.Tracer) MiddlewareOut
Click to show internal directories.
Click to hide internal directories.