Documentation ¶
Overview ¶
Package http provides an http service entry point.
The http package's constructor is expected to be passed to a bootstrapper instance in order to be autoconfigured. A fully configured instance is ready to be used as a go-micro service.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewService ¶
func NewService( engine ServerEngine, client client.Client, registry registry.Registry, broker messaging.BrokerWithOptions, cache cache.Cache, tracer *oteltrace.TracerProvider, logger plog.Logger, serverConfig *config.ServerConfig, resilienceConfig *config.ResilienceConfig, corsConfig *config.CORSConfig, tracerConfig *config.TracerConfig, ) micro.Service
A micro.Service constructor. Called automatically by fx if provided to a bootstrapper instance.
Returns a fully configured and ready to use http based micro.Service. Panics on any error.
Types ¶
type ServerEngine ¶
type ServerEngine interface { ApplyMiddleware(middlewares ...func(http.Handler) http.Handler) NewHandler() interface { ServeHTTP(w http.ResponseWriter, req *http.Request) } }
ServerEngine provides main ways of interactions with any http server implementation (gorilla, chi, gin and so on).
Click to show internal directories.
Click to hide internal directories.