server

package
v0.0.0-...-03485e9 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ProxyHandler

type ProxyHandler interface {
	Redirect(w http.ResponseWriter, r *http.Request)
}

type Server

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

Server contains methods for serving and shutting down the server.

func New

func New(ctx context.Context, cfg *config.Config, handler ProxyHandler) *Server

New configures routes and returns a server instance.

func (Server) Serve

func (s Server) Serve() error

Serve starts initialized server.

func (Server) Shutdown

func (s Server) Shutdown(ctx context.Context) error

Shutdown stops initialized server with provided context.

Jump to

Keyboard shortcuts

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