Documentation ¶
Index ¶
- Constants
- func AnnotateRouter(vrs *VersionedRouterSpec) gin.HandlerFunc
- func ErrorHandler() gin.HandlerFunc
- func NewFxLogAdapter() fxevent.Logger
- func NewPrometheusServer(lc fx.Lifecycle, shutdown fx.Shutdowner, c *Config)
- func NewTracer(lc fx.Lifecycle) (trace.TracerProvider, error)
- func SetupDefaultLoglevel()
- func SetupServer(lc fx.Lifecycle, shutdown fx.Shutdowner, router *Core, config *Config) *http.Server
- type Config
- type Core
- type FxLogAdapter
- type In
- type Middleware
- type VersionedRouterOut
- type VersionedRouterSpec
Constants ¶
View Source
const ( GIN_KV_ROUTER_VERSION_KEY = "slapi.router_version" GIN_KV_ROUTER_NAME_KEY = "slapi.router_name" )
Variables ¶
This section is empty.
Functions ¶
func AnnotateRouter ¶
func AnnotateRouter(vrs *VersionedRouterSpec) gin.HandlerFunc
func ErrorHandler ¶
func ErrorHandler() gin.HandlerFunc
func NewFxLogAdapter ¶
func NewPrometheusServer ¶ added in v1.0.1
func NewPrometheusServer(lc fx.Lifecycle, shutdown fx.Shutdowner, c *Config)
func SetupDefaultLoglevel ¶
func SetupDefaultLoglevel()
func SetupServer ¶
Types ¶
type Config ¶
func GetConfigDefaults ¶
func GetConfigDefaults() *Config
type FxLogAdapter ¶
type FxLogAdapter struct {
// contains filtered or unexported fields
}
func (*FxLogAdapter) LogEvent ¶
func (l *FxLogAdapter) LogEvent(event fxevent.Event)
type In ¶
type In struct { fx.In Config *Config VersionedRouter []*VersionedRouterSpec `group:"router"` CorsConfig *cors.Config `optional:"true"` OtelTracer trace.TracerProvider }
type Middleware ¶
type VersionedRouterOut ¶
type VersionedRouterOut struct { fx.Out Router *VersionedRouterSpec `group:"router"` }
type VersionedRouterSpec ¶
type VersionedRouterSpec struct { Prefix string Version uint RegisterRouter func(group *gin.RouterGroup) }
Click to show internal directories.
Click to hide internal directories.