Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LogLevelType ¶
type LogLevelType string
const ( LogLevelTypeNoLog LogLevelType = "" LogLevelTypeDebug LogLevelType = "debug" LogLevelTypeInfo LogLevelType = "info" LogLevelTypeError LogLevelType = "error" )
type LogMiddleware ¶
func NewLogMiddleware ¶
func NewLogMiddleware(name string, meta types.Metadata) (*LogMiddleware, error)
type MetadataMiddleware ¶ added in v1.4.2
func NewMetadataMiddleware ¶ added in v1.4.2
func NewMetadataMiddleware(meta types.Metadata) (*MetadataMiddleware, error)
type MetricsMiddleware ¶
type MetricsMiddleware struct {
// contains filtered or unexported fields
}
func NewMetricsMiddleware ¶
func NewMetricsMiddleware(cfg config.BindingConfig, exporter *metrics.Exporter) (*MetricsMiddleware, error)
type Middleware ¶
type Middleware interface {
Do(ctx context.Context, request *types.Request) (*types.Response, error)
}
func Chain ¶
func Chain(md Middleware, list ...MiddlewareFunc) Middleware
type MiddlewareFunc ¶
type MiddlewareFunc func(Middleware) Middleware
func Log ¶
func Log(log *LogMiddleware) MiddlewareFunc
func Metadata ¶ added in v1.4.2
func Metadata(m *MetadataMiddleware) MiddlewareFunc
func Metric ¶
func Metric(m *MetricsMiddleware) MiddlewareFunc
func RateLimiter ¶
func RateLimiter(rl *RateLimitMiddleware) MiddlewareFunc
func Retry ¶
func Retry(r *RetryMiddleware) MiddlewareFunc
type RateLimitMiddleware ¶
type RateLimitMiddleware struct {
// contains filtered or unexported fields
}
func NewRateLimitMiddleware ¶
func NewRateLimitMiddleware(meta types.Metadata) (*RateLimitMiddleware, error)
func (*RateLimitMiddleware) Take ¶
func (rl *RateLimitMiddleware) Take()
type RetryMiddleware ¶
type RetryMiddleware struct {
// contains filtered or unexported fields
}
func NewRetryMiddleware ¶
Click to show internal directories.
Click to hide internal directories.