middleware

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2024 License: BSD-2-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandlerFromList

func HandlerFromList(middlewares []interfaces.IMiddleware) func(routeFunc interfaces.RouteFunc) interfaces.RouteFunc

func HandlerFromStrings

func HandlerFromStrings(app interfaces.IService, middlewares []string) func(routeFunc interfaces.RouteFunc) interfaces.RouteFunc

func NewRestoreMiddleware added in v0.0.11

func NewRestoreMiddleware(name string) interfaces.IMiddleware

func NewTimeoutMiddleware added in v0.0.11

func NewTimeoutMiddleware(name string, cfg TimeoutMiddlewareConfig) interfaces.IMiddleware

func NewTimingMiddleware added in v0.0.11

func NewTimingMiddleware(name string) interfaces.IMiddleware

Types

type RestoreMiddleware

type RestoreMiddleware struct {
	Name string
	// contains filtered or unexported fields
}

func (*RestoreMiddleware) Init

func (*RestoreMiddleware) Invoke

func (*RestoreMiddleware) Stop

func (t *RestoreMiddleware) Stop() error

func (*RestoreMiddleware) String

func (t *RestoreMiddleware) String() string

type TimeoutMiddleware added in v0.0.11

type TimeoutMiddleware struct {
	Name   string
	Config TimeoutMiddlewareConfig
}

func (*TimeoutMiddleware) Init added in v0.0.11

func (*TimeoutMiddleware) Invoke added in v0.0.11

func (*TimeoutMiddleware) Stop added in v0.0.11

func (t *TimeoutMiddleware) Stop() error

func (*TimeoutMiddleware) String added in v0.0.11

func (t *TimeoutMiddleware) String() string

type TimeoutMiddlewareConfig added in v0.0.11

type TimeoutMiddlewareConfig struct {
	Timeout time.Duration `yaml:"timeout"`
}

type TimingMiddleware

type TimingMiddleware struct {
	Name string
	// contains filtered or unexported fields
}

func (*TimingMiddleware) Init

func (*TimingMiddleware) Invoke

func (*TimingMiddleware) Stop

func (t *TimingMiddleware) Stop() error

func (*TimingMiddleware) String

func (t *TimingMiddleware) String() string

Jump to

Keyboard shortcuts

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