Documentation ¶
Overview ¶
Package middleware implements the functions, types, and interfaces for the module.
Package middleware implements the functions, types, and interfaces for the module.
Package middleware implements the functions, types, and interfaces for the module.
Package middleware implements the functions, types, and interfaces for the module.
Package middleware implements the functions, types, and interfaces for the module.
Package middlewares implements the functions, types, and interfaces for the module.
Package middleware implements the functions, types, and interfaces for the module.
Package middleware implements the functions, types, and interfaces for the module.
Package middleware implements the functions, types, and interfaces for the module.
Package middleware implements the functions, types, and interfaces for the module.
Package middleware implements the functions, types, and interfaces for the module.
Index ¶
- Constants
- type KHandler
- type KMiddleware
- func Chain(m ...KMiddleware) KMiddleware
- func CircuitBreakerClient(ms []KMiddleware) []KMiddleware
- func JwtClient(cfg *jwtv1.JWT) (KMiddleware, bool)
- func JwtServer(cfg *jwtv1.JWT) (KMiddleware, bool)
- func LoggingClient(ms []KMiddleware, logger log.Logger) []KMiddleware
- func LoggingServer(ms []KMiddleware, logger log.Logger) []KMiddleware
- func MetadataClient(ms []KMiddleware, cfg *middlewarev1.Middleware_Metadata) []KMiddleware
- func MetadataServer(ms []KMiddleware, cfg *middlewarev1.Middleware_Metadata) []KMiddleware
- func NewClient(cfg *middlewarev1.Middleware, ss ...OptionSetting) []KMiddleware
- func NewServer(cfg *middlewarev1.Middleware, ss ...OptionSetting) []KMiddleware
- func RateLimitServer(ms []KMiddleware, cfg *ratelimitv1.RateLimiter) []KMiddleware
- func Recovery(ms []KMiddleware) []KMiddleware
- func SelectorClient(cfg *selectorv1.Selector, matchFunc selector.MatchFunc, middleware KMiddleware) KMiddleware
- func SelectorServer(cfg *selectorv1.Selector, matchFunc selector.MatchFunc, middleware KMiddleware) KMiddleware
- func TracingClient(ms []KMiddleware) []KMiddleware
- func TracingServer(ms []KMiddleware) []KMiddleware
- func Validate(ms []KMiddleware, validator *validatorv1.Validator) []KMiddleware
- func ValidateServer(ms []KMiddleware, validator *validatorv1.Validator) []KMiddleware
- type Middleware
- type Option
- type OptionSetting
Constants ¶
const Type = "middleware"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KHandler ¶ added in v0.1.18
type KHandler = middleware.Handler
type KMiddleware ¶ added in v0.1.18
type KMiddleware = middleware.Middleware
func Chain ¶
func Chain(m ...KMiddleware) KMiddleware
Chain returns a middleware that executes a chain of middleware.
func CircuitBreakerClient ¶
func CircuitBreakerClient(ms []KMiddleware) []KMiddleware
func LoggingClient ¶ added in v0.1.15
func LoggingClient(ms []KMiddleware, logger log.Logger) []KMiddleware
func LoggingServer ¶ added in v0.1.15
func LoggingServer(ms []KMiddleware, logger log.Logger) []KMiddleware
func MetadataClient ¶
func MetadataClient(ms []KMiddleware, cfg *middlewarev1.Middleware_Metadata) []KMiddleware
func MetadataServer ¶
func MetadataServer(ms []KMiddleware, cfg *middlewarev1.Middleware_Metadata) []KMiddleware
func NewClient ¶
func NewClient(cfg *middlewarev1.Middleware, ss ...OptionSetting) []KMiddleware
NewClient creates a new client with the given configuration
func NewServer ¶
func NewServer(cfg *middlewarev1.Middleware, ss ...OptionSetting) []KMiddleware
NewServer creates a new server with the given configuration
func RateLimitServer ¶
func RateLimitServer(ms []KMiddleware, cfg *ratelimitv1.RateLimiter) []KMiddleware
func Recovery ¶
func Recovery(ms []KMiddleware) []KMiddleware
func SelectorClient ¶ added in v0.1.15
func SelectorClient(cfg *selectorv1.Selector, matchFunc selector.MatchFunc, middleware KMiddleware) KMiddleware
func SelectorServer ¶ added in v0.1.15
func SelectorServer(cfg *selectorv1.Selector, matchFunc selector.MatchFunc, middleware KMiddleware) KMiddleware
func TracingClient ¶
func TracingClient(ms []KMiddleware) []KMiddleware
func TracingServer ¶
func TracingServer(ms []KMiddleware) []KMiddleware
func Validate ¶
func Validate(ms []KMiddleware, validator *validatorv1.Validator) []KMiddleware
Validate is a middleware validator. Deprecated: use ValidateServer
func ValidateServer ¶ added in v0.0.12
func ValidateServer(ms []KMiddleware, validator *validatorv1.Validator) []KMiddleware
type Middleware ¶
type Middleware struct { }
type OptionSetting ¶ added in v0.1.0
type OptionSetting = func(*Option)
func WithLogger ¶ added in v0.1.29
func WithLogger(logger log.Logger) OptionSetting
func WithMatchFunc ¶ added in v0.1.29
func WithMatchFunc(matchFunc selector.MatchFunc) OptionSetting
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package empty implements the functions, types, and interfaces for the module.
|
Package empty implements the functions, types, and interfaces for the module. |
Package optimize implements the functions, types, and interfaces for the module.
|
Package optimize implements the functions, types, and interfaces for the module. |
Package selector implements the functions, types, and interfaces for the module.
|
Package selector implements the functions, types, and interfaces for the module. |
Package validate implements the functions, types, and interfaces for the module.
|
Package validate implements the functions, types, and interfaces for the module. |