server

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	Instance *http.Server
}

Server wraps an http.Server with graceful shutdown

func NewServer

func NewServer(addr string, handler http.Handler) *Server

NewServer creates a new Server with the given address and handler

func (*Server) AwaitShutdown

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

AwaitShutdown blocks until context is cancelled, then gracefully shuts down

func (*Server) Start

func (s *Server) Start()

Start starts the server in a goroutine

Jump to

Keyboard shortcuts

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