ResponseTimeBalancer

package module
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 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:
          cookieName: "pod-id"
          responseTimeHeaderName: "Tm"
          responseTimeLimitMs: "2"

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 {
	ResponseTimeHeaderName string `json:"responseTimeHeaderName"`
	ResponseTimeLimitMs    string `json:"responseTimeLimitMs"`
	CookieSetHeaderValue   string `json:"cookieSetHeaderValue"`
}

Config the plugin configuration.

func CreateConfig

func CreateConfig() *Config

CreateConfig creates the default plugin configuration.

type ResponseTimeLimit

type ResponseTimeLimit struct {
	// 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