httpserver

package
v0.0.0-...-c2add7f Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2023 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Overview

Package httpserver implements handy wrap around HTTP server to group common settings and tasks inside single entity.

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
}

Server wraps HTTP server entity and handy means to simplify work with the entity.

func New

func New(handler http.Handler, address entity.NetAddress) *Server

New creates and initializes new instance of HTTP server.

func (*Server) Notify

func (s *Server) Notify() <-chan error

Notify reports errors received during start and work of the server. Usually such errors are not recoverable.

func (*Server) Shutdown

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

Shutdown gracefully stops the server.

func (*Server) Start

func (s *Server) Start()

Start launches the HTTP server.

Jump to

Keyboard shortcuts

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