httpserver

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package httpserver connects a standard HTTP server to the application lifecycle. Any router that implements http.Handler can be used as the server's handler.

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
}

func New

func New(server *http.Server) *Server

func (*Server) Addr

func (s *Server) Addr() net.Addr

Addr returns the bound address after Start, useful when binding to port zero.

func (*Server) Start

func (s *Server) Start(ctx context.Context) error

Start binds the listener before returning, so bind failures are startup errors.

func (*Server) Stop

func (s *Server) Stop(ctx context.Context) error

Stop drains requests and forcibly closes connections if its deadline expires.

func (*Server) Wait

func (s *Server) Wait() error

Jump to

Keyboard shortcuts

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