router

package
v0.0.0-...-845c20a Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRouterForMetrics

func NewRouterForMetrics(e *echo.Echo, c RouterConfig) *echo.Echo

NewRouterForMetrics fill the routing information for /metrics endpoint. e is the echo instance c is the router configuration Return the echo instance configured for the metrics for success execution, else raise any panic.

func NewRouterWithConfig

func NewRouterWithConfig(e *echo.Echo, c RouterConfig) *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. c is the router configuration. metrics 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