stack

package
v2.7.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2018 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package stack provides shortcuts for applications that need just one top level stack

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Check

func Check(w wrap.Wrapper) wrap.Wrapper

Check may be used in to compose Wrapper with inner middleware stacks like in It checks if the wrappers context requirements are fulfilled by the top level context stack.Use( wrap.New(stack.Check(wrapper1), stack.Check(wrapper2)) )

func Handler

func Handler() http.Handler

Handler composes the stack and returns a handler for it

func New

func New(inject wrap.ContextInjecter)

New checks inject for validity and sets it as the global top level context

func Use

func Use(w ...wrap.Wrapper)

Use adds the given wrappers to the middleware stack after checking if their context requirements are fulfilled by the global toplevel context

Types

This section is empty.

Jump to

Keyboard shortcuts

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