server

package
v1.2.2 Latest Latest
Warning

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

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

Documentation

Overview

Package server contains the core logic for starting processor and serving resulting metrics.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StartServer

func StartServer(interval time.Duration, server Server, options common.Options)

StartServer starts processing the metrics and serving them on the /metrics endpoint.

Types

type Server

type Server interface {
	// Handle registers a handler for the given pattern, similar to http.Handle.
	Handle(pattern string, handler http.Handler)

	// Start starts the server and blocks until the server is stopped.
	Start(ctx context.Context) error
}

Server is the interface for serving the metrics.

Jump to

Keyboard shortcuts

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