server

package
v0.0.0-...-e05cb4d Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package server implements an HTTP server.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrCrashed  = errors.New("server crashed")
	ErrShutdown = errors.New("server could not be shutdown")
)
View Source
var ErrAccessSrvDirectory = errors.New("cannot access srv directory in embedded filesystem")

Functions

This section is empty.

Types

type Server

type Server interface {
	Run(ctx context.Context) error
}

func New

func New(c config.HTTP, logger logging.Logger, metrics metrics.Metrics, fs http.FileSystem) Server

Directories

Path Synopsis
middlewares
log
metrics
Package metrics implements a metrics middleware for an HTTP server that records metrics data for Prometheus.
Package metrics implements a metrics middleware for an HTTP server that records metrics data for Prometheus.
routes
fs
Package fs is the HTTP handler to serve files from an http.FileSystem.
Package fs is the HTTP handler to serve files from an http.FileSystem.

Jump to

Keyboard shortcuts

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