Documentation ¶
Index ¶
- Constants
- type Policy
- type Retryer
- func (r *Retryer) Close()
- func (r *Retryer) DefaultSpec() interface{}
- func (r *Retryer) Description() string
- func (r *Retryer) Handle(ctx context.HTTPContext) string
- func (r *Retryer) Inherit(filterSpec *httppipeline.FilterSpec, previousGeneration httppipeline.Filter)
- func (r *Retryer) Init(filterSpec *httppipeline.FilterSpec)
- func (r *Retryer) Kind() string
- func (r *Retryer) Results() []string
- func (r *Retryer) Status() interface{}
- type Spec
- type URLRule
Constants ¶
View Source
const (
// Kind is the kind of Retryer.
Kind = "Retryer"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Policy ¶
type Policy struct { Name string `yaml:"name" jsonschema:"required"` MaxAttempts int `yaml:"maxAttempts" jsonschema:"omitempty,minimum=1"` WaitDuration string `yaml:"waitDuration" jsonschema:"omitempty,format=duration"` BackOffPolicy string `yaml:"backOffPolicy" jsonschema:"omitempty,enum=random,enum=exponential"` RandomizationFactor float64 `yaml:"randomizationFactor" jsonschema:"omitempty,minimum=0,maximum=1"` CountingNetworkError bool `yaml:"countingNetworkError" jsonschema:"omitempty"` FailureStatusCodes []int `yaml:"failureStatusCodes" jsonschema:"omitempty,uniqueItems=true,format=httpcode-array"` // contains filtered or unexported fields }
Policy is the policy of the retryer
type Retryer ¶
type Retryer struct {
// contains filtered or unexported fields
}
Retryer is the struct of retryer
func (*Retryer) DefaultSpec ¶
func (r *Retryer) DefaultSpec() interface{}
DefaultSpec returns the default spec of Retryer.
func (*Retryer) Description ¶
Description returns the description of Retryer
func (*Retryer) Handle ¶
func (r *Retryer) Handle(ctx context.HTTPContext) string
Handle handles HTTP request
func (*Retryer) Inherit ¶
func (r *Retryer) Inherit(filterSpec *httppipeline.FilterSpec, previousGeneration httppipeline.Filter)
Inherit inherits previous generation of Retryer.
func (*Retryer) Init ¶
func (r *Retryer) Init(filterSpec *httppipeline.FilterSpec)
Init initializes Retryer.
Click to show internal directories.
Click to hide internal directories.