web

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: May 5, 2023 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HTTPServer

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

HTTPServer is an http server.

func NewHTTPServer

func NewHTTPServer(ctx context.Context) (*HTTPServer, error)

func (*HTTPServer) Close

func (s *HTTPServer) Close() error

Close closes the HTTP server.

func (*HTTPServer) ListenAndServe

func (s *HTTPServer) ListenAndServe() error

ListenAndServe starts the HTTP server.

func (*HTTPServer) Shutdown

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

Shutdown gracefully shuts down the HTTP server.

type Matcher

type Matcher = func(*url.URL) *match

Matcher finds a match in a *url.URL.

type Pattern

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

Pattern is a pattern for matching a URL. It matches against GET requests.

func NewPattern

func NewPattern(m Matcher) *Pattern

NewPattern returns a new Pattern with the given matcher.

func (*Pattern) Match

func (p *Pattern) Match(r *http.Request) *http.Request

Match is a match for a URL.

It implements goji.Pattern.

Jump to

Keyboard shortcuts

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