httpfx

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ServerModule = fx.Module("geck/transport/http/server",
	fx.Provide(
		env.ParseAs[geckhttp.ServerConfig],
		geckhttp.NewEchoServer,
	),
	fx.Invoke(
		registerServerEndpoints,
		startServer,
	),
)

ServerModule is the `uber/fx` module of the geckhttp package, aimed for HTTP servers.

This module uses `labstack/echo` as HTTP framework for internal operations.

Functions

func AsController

func AsController(t any) any

AsController annotates `t` (preferred a builder routine) as a geckhttp.Controller and adds it to the HTTP controller registry.

The HTTP registry is used by the `geck` HTTP server module, which eventually will call each of the registered geckhttp.Controller.RegisterEndpoints, exposing all registered endpoints through the running HTTP server.

This annotation only works for `uber/fx` providers.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳