web

package
Version: v0.0.0-...-3da3251 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2021 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Addr            string
	ShutdownTimeout time.Duration
}

type Pages

type Pages struct {
	HomePage       []byte
	DeprecatedPage []byte
}

type Server

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

func NewServer

func NewServer(
	cfg Config,
	m *metrics.Metrics,
	data *scraper.Data,
	fs embed.FS,
	log logrus.FieldLogger,
) (*Server, error)

func (*Server) APIRequest

func (s *Server) APIRequest(next http.Handler) http.Handler

func (*Server) HTTPError

func (s *Server) HTTPError(w io.Writer, errString string) error

func (*Server) LogRequest

func (s *Server) LogRequest(next http.Handler) http.Handler

func (*Server) Shutdown

func (s *Server) Shutdown() error

func (*Server) Start

func (s *Server) Start() error

nolint

Jump to

Keyboard shortcuts

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