server

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler func(w *response.Writer, req *request.Request)

type HandlerError

type HandlerError struct {
	StatusCode response.StatusCode
	Message    string
}

func (*HandlerError) WriteError

func (he *HandlerError) WriteError(w io.Writer) error

type Server

type Server struct {
	IsOpen atomic.Bool
	// contains filtered or unexported fields
}

func Serve

func Serve(port int, handler Handler) (*Server, error)

func (*Server) Close

func (s *Server) Close() error

Jump to

Keyboard shortcuts

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