common

package
v0.0.0-...-82f4cde Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Routes = lib.Routes{
	lib.Route{
		Method:      "OPTIONS",
		HandlerFunc: optionsHandler,
	},

	lib.Route{
		Name:        "versions",
		Method:      "GET",
		Path:        "/versions",
		HandlerFunc: VersionsHandler,
	},

	lib.Route{
		Name:        "healthcheck",
		Method:      "GET",
		Path:        "/health",
		HandlerFunc: HealthCheck,
	},

	lib.Route{
		Name:        "ready",
		Method:      "GET",
		Path:        "/ready",
		HandlerFunc: Ready,
	},

	lib.Route{
		Name:        "swagger.json",
		Method:      "GET",
		Path:        "/swagger.json",
		HandlerFunc: SwaggerJSON,
	},

	lib.Route{
		Name:        "genesis",
		Method:      "GET",
		Path:        "/genesis",
		HandlerFunc: GenesisJSON,
	},
}

Routes are routes that are common for all versions

Functions

func GenesisJSON

func GenesisJSON(ctx lib.ReqContext, context echo.Context)

GenesisJSON is an httpHandler for route GET /genesis

func HealthCheck

func HealthCheck(ctx lib.ReqContext, context echo.Context)

HealthCheck is an httpHandler for route GET /health

func Metrics

func Metrics(ctx lib.ReqContext, context echo.Context)

Metrics returns data collected by util/metrics

func Ready

func Ready(ctx lib.ReqContext, context echo.Context)

Ready is a httpHandler for route GET /ready it serves "readiness" probe on if the node is healthy and fully caught-up.

func SwaggerJSON

func SwaggerJSON(ctx lib.ReqContext, context echo.Context)

SwaggerJSON is an httpHandler for route GET /swagger.json

func VersionsHandler

func VersionsHandler(ctx lib.ReqContext, context echo.Context)

VersionsHandler is an httpHandler for route GET /versions

Types

type VersionsResponse

type VersionsResponse struct {
	// in: body
	Body common.Version
}

VersionsResponse is the response to 'GET /versions'

swagger:response VersionsResponse

func (VersionsResponse) GetError

func (r VersionsResponse) GetError() error

GetError allows VersionResponse to satisfy the APIV1Response interface, even though it can never return an error and is not versioned

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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