package
Version:
v0.6.0
Opens a new window with list of versions in this module.
Published: Sep 27, 2024
License: MIT
Opens a new window with license information.
Imports: 8
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Package httpgroup implements an errgroup for HTTP Servers
Group is a variant of errgroup.Group on which workers
are *http.Server/net.Listener instances
Cancel initiates a shutdown of all *http.Server{}s
Cancelled tells if the Group has been cancelled
Count returns how many servers are running in the Group
Go spawns a new Server controlled by the Group
SetContext initialises a Group with a given and externally
cancellable context.
SetLogger sets the slog.Logger to be used when supervising
workers
Wait blocks until all servers have shut down
Server is a subset of the standard *http.Server including what httpgroup uses
Worker is an abstraction of a running Server
IsError filters out errors that can stop the Group
Run is the blocking call that runs the Server
Shutdown is the blocking call that stops a Server
Source Files
¶
Click to show internal directories.
Click to hide internal directories.