version

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Path string
	Info ports.VersionInfo
}

Config controls how the version endpoint is registered.

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

Handler wires the version endpoint.

func NewHandler

func NewHandler(cfg Config) *Handler

NewHandler constructs a Handler from the provided config.

func (*Handler) Handler

func (h *Handler) Handler() http.HandlerFunc

Handler returns an HTTP handler that writes the version info JSON.

func (*Handler) RegisterRoutes

func (h *Handler) RegisterRoutes(router interface {
	Get(pattern string, h http.HandlerFunc)
})

RegisterRoutes mounts the handler on the router.

Jump to

Keyboard shortcuts

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