server

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package server exposes the pool over HTTP.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

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

Server serves take/release/status/reload over HTTP.

func New

func New(p *pool.Pool, apiKey string, reload func() error) *Server

New builds a Server. reload may be nil.

func (*Server) Handler

func (s *Server) Handler() http.Handler

Handler returns the configured HTTP mux.

func (*Server) WithMetrics

func (s *Server) WithMetrics(h http.HandlerFunc) *Server

WithMetrics mounts an unauthenticated /metrics handler (Prometheus scrape).

Jump to

Keyboard shortcuts

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