ResponseTimeBalancer

package module
v1.0.4 Latest Latest
Warning

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

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

README

Dynamic :

http:

https://doc.traefik.io/traefik/middlewares/http/overview/

middlewares: rtb: plugin: rtb_static: cookie_name: "pod-id" response_time_limit_ms: 50

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(ctx context.Context, next http.Handler, config *Config, name string) (http.Handler, error)

New created a new Demo plugin.

Types

type Config

type Config struct {
	CookieName        string `json:"cookie_name,omitempty"`
	ResponseTimeLimit int64  `json:"response_time_limit_ms,omitempty"`
}

Config the plugin configuration.

func CreateConfig

func CreateConfig() *Config

CreateConfig creates the default plugin configuration.

type ResponseTimeLimit

type ResponseTimeLimit struct {
	CookieName        string
	ResponseTimeLimit int64
	// contains filtered or unexported fields
}

ResponseTimeLimit a ResponseTimeLimit plugin.

func (*ResponseTimeLimit) ServeHTTP

func (a *ResponseTimeLimit) ServeHTTP(rw http.ResponseWriter, req *http.Request)

Jump to

Keyboard shortcuts

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