httprouter

package
v0.67.0 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(oo ...OptionFunc) (*httprouter.Router, error)

func NewFileServerRoute

func NewFileServerRoute(path string, assetsDir string, fallbackPath string) (*v2.Route, error)

NewFileServerRoute returns a route that acts as a file server.

Types

type Config

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

Config definition.

type OptionFunc

type OptionFunc func(*Config) error

OptionFunc definition to allow functional configuration of the router.

func AliveCheck

func AliveCheck(acf v2.LivenessCheckFunc) OptionFunc

AliveCheck option for the router.

func DeflateLevel

func DeflateLevel(level int) OptionFunc

DeflateLevel option for the compression middleware.

func EnableExpVarProfiling

func EnableExpVarProfiling() OptionFunc

EnableExpVarProfiling option for enabling expVar in profiling endpoints.

func Middlewares

func Middlewares(mm ...middleware.Func) OptionFunc

Middlewares option for middlewares.

func ReadyCheck

func ReadyCheck(rcf v2.ReadyCheckFunc) OptionFunc

ReadyCheck option for the router.

func Routes

func Routes(routes ...*v2.Route) OptionFunc

Routes option for providing routes to the router.

Jump to

Keyboard shortcuts

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