timelimiter

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

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) Close

func (tl *TimeLimiter) Close()

Close closes TimeLimiter.

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.

type URLRule

type URLRule struct {
	urlrule.URLRule `yaml:",inline"`
	TimeoutDuration string `yaml:"timeoutDuration" jsonschema:"omitempty,format=duration"`
	// contains filtered or unexported fields
}

URLRule is the URL rule

Jump to

Keyboard shortcuts

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