server

package
v0.0.0-...-9067f3d Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Package server provides an HTTP server, coupled with an HTTP request multiplexer (MUX).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HTTPServer

type HTTPServer struct {
	http.Server
	// contains filtered or unexported fields
}

HTTPServer is a wrapper around http.Server additionally exposing *RequestHandler for closing resources

func NewHTTPServer

func NewHTTPServer(addr string) *HTTPServer

NewHTTPServer returns a new http server

func (*HTTPServer) Close

func (s *HTTPServer) Close(ctx context.Context) model.Errors

Close closes the server and all resources

type RequestHandler

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

RequestHandler contains necessary dependents to handle HTTP requests.

func NewHTTPHandler

func NewHTTPHandler(config config.Config) *RequestHandler

NewHTTPHandler returns an instance of HTTPHandler

Jump to

Keyboard shortcuts

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