serve

package
v0.0.0-...-00f2437 Latest Latest
Warning

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

Go to latest
Published: May 24, 2021 License: MIT Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RecoveryHandler

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

RecoveryHandler wraps a http.Handler and recovers from panics

func NewRecoveryHandler

func NewRecoveryHandler(rootHandler http.Handler, logger golog.Logger) RecoveryHandler

NewRecoveryHandler creates a new RecoveryHandler

func (RecoveryHandler) ServeHTTP

func (r RecoveryHandler) ServeHTTP(w http.ResponseWriter, req *http.Request)

ServeHTTP implements http.Handler.ServeHTTP

type Server

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

Server responds to HTTP requests

func NewServer

func NewServer(ctx context.Context, cfg config.Config, logger golog.Logger) Server

NewServer creates a Server

func (Server) Serve

func (s Server) Serve() error

Serve brings up an HTTP server to serve requests

Jump to

Keyboard shortcuts

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