chi

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package chi provides some basic implementations for building routers based on go-chi/chi

Index

Constants

View Source
const ChiDefaultDebugPattern = "/__debug/"

Variables

This section is empty.

Functions

func DefaultFactory

func DefaultFactory(proxyFactory proxy.Factory, logger log.Logger) route.Factory

func NewEndpointHandler

func NewEndpointHandler(cfg *config.EndpointConfig, proxy proxy.Proxy) http.HandlerFunc

func NewFactory

func NewFactory(cfg Config) route.Factory

Types

type Config

type Config struct {
	Engine         chi.Router
	Middlewares    chi.Middlewares
	HandlerFactory HandlerFactory
	ProxyFactory   proxy.Factory
	Logger         log.Logger
	DebugPattern   string
	RunServer      RunServerFunc
}

type HandlerFactory

type HandlerFactory func(*config.EndpointConfig, proxy.Proxy) http.HandlerFunc

Jump to

Keyboard shortcuts

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