httpserver

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultNotFoundHandler

func DefaultNotFoundHandler() http.Handler

Types

type Server

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

func New

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

func (*Server) Name

func (s *Server) Name() string

func (*Server) Start

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

Start блокируется, пока сервер работает. Остановка происходит извне: оркестратор вызовет Stop(ctx) -> Shutdown().

func (*Server) Stop

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

Stop делает graceful shutdown, используя ctx (с таймаутом от оркестратора).

Jump to

Keyboard shortcuts

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