httpserver

package
v0.0.0-...-452a94c Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package httpserver implements the core HTTP server

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FirewallConfig

type FirewallConfig struct {
	TransitionDuration time.Duration
}

type FirewallHandler

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

func NewFirewallHandler

func NewFirewallHandler(log *slog.Logger, config FirewallConfig) *FirewallHandler

type FirewallMode

type FirewallMode uint32
const (
	Maintenance FirewallMode = iota
	Production
	TransitionToMaintenance
)

func (FirewallMode) String

func (fm FirewallMode) String() string

type HTTPServerConfig

type HTTPServerConfig struct {
	ListenAddr string
	Log        *slog.Logger

	DrainDuration            time.Duration
	GracefulShutdownDuration time.Duration
	ReadTimeout              time.Duration
	WriteTimeout             time.Duration
}

type Server

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

func New

func New(cfg *HTTPServerConfig) (srv *Server, err error)

func (*Server) RunInBackground

func (srv *Server) RunInBackground()

func (*Server) Shutdown

func (srv *Server) Shutdown()

Jump to

Keyboard shortcuts

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