Documentation ¶
Index ¶
- Constants
- type Spec
- type TimeLimiter
- func (tl *TimeLimiter) Close()
- func (tl *TimeLimiter) DefaultSpec() interface{}
- func (tl *TimeLimiter) Description() string
- func (tl *TimeLimiter) Handle(ctx context.HTTPContext) string
- func (tl *TimeLimiter) Inherit(filterSpec *httppipeline.FilterSpec, previousGeneration httppipeline.Filter)
- func (tl *TimeLimiter) Init(filterSpec *httppipeline.FilterSpec)
- func (tl *TimeLimiter) Kind() string
- func (tl *TimeLimiter) Results() []string
- func (tl *TimeLimiter) Status() interface{}
- type URLRule
Constants ¶
View Source
const (
// Kind is the kind of TimeLimiter.
Kind = "TimeLimiter"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Spec ¶
type Spec struct { DefaultTimeoutDuration string `yaml:"defaultTimeoutDuration" jsonschema:"omitempty,format=duration"` URLs []*URLRule `yaml:"urls" jsonschema:"required"` // contains filtered or unexported fields }
Spec is the spec of time limiter
type TimeLimiter ¶
type TimeLimiter struct {
// contains filtered or unexported fields
}
TimeLimiter is the time limiter struct
func (*TimeLimiter) DefaultSpec ¶
func (tl *TimeLimiter) DefaultSpec() interface{}
DefaultSpec returns the default spec of TimeLimiter.
func (*TimeLimiter) Description ¶
func (tl *TimeLimiter) Description() string
Description returns the description of TimeLimiter
func (*TimeLimiter) Handle ¶
func (tl *TimeLimiter) Handle(ctx context.HTTPContext) string
Handle handles HTTP request
func (*TimeLimiter) Inherit ¶
func (tl *TimeLimiter) Inherit(filterSpec *httppipeline.FilterSpec, previousGeneration httppipeline.Filter)
Inherit inherits previous generation of TimeLimiter.
func (*TimeLimiter) Init ¶
func (tl *TimeLimiter) Init(filterSpec *httppipeline.FilterSpec)
Init initializes TimeLimiter.
func (*TimeLimiter) Kind ¶
func (tl *TimeLimiter) Kind() string
Kind returns the kind of TimeLimiter.
func (*TimeLimiter) Results ¶
func (tl *TimeLimiter) Results() []string
Results returns the results of TimeLimiter.
func (*TimeLimiter) Status ¶
func (tl *TimeLimiter) Status() interface{}
Status returns Status generated by Runtime.
Click to show internal directories.
Click to hide internal directories.