router

package
v0.0.0-...-4bfe12e Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMetricsRouter

func NewMetricsRouter(e *echo.Echo, cfg *config.Config, h metrics_handler.ServerInterface) *echo.Echo

NewMetricsRouter fill the routing information for /metrics endpoint. e is the echo instance cfg is the router configuration h is the handler to retrieve the metrics. Return the echo instance configured for the metrics for success execution, else raise any panic.

func NewRouterWithConfig

func NewRouterWithConfig(e *echo.Echo, cfg *config.Config, public *openapi3.T, h handler.Application, m *metrics.Metrics) *echo.Echo

NewRouterWithConfig fill the router configuration for the given echo instance, providing routes for the public endpoints, the private paths (includes the healthcheck), and the /metrics path e is the echo instance where to add the routes. cfg is the application configuration. public is the openapi specification. h is the application handler. m is the reference to the metrics storage. Return the echo instance set up; is something fails it panics.

Types

type RouterConfig

type RouterConfig struct {
	Handlers           handler.Application
	PublicPath         string
	PrivatePath        string
	Version            string
	MetricsPath        string
	IsFakeEnabled      bool
	EnableAPIValidator bool
	Metrics            *metrics.Metrics
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL