server

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2024 License: Apache-2.0 Imports: 8 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, prometheusURL string, server Server)

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