proxy

package
v0.0.0-...-75db6e8 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ProxyHandler

func ProxyHandler(c *fiber.Ctx) error

Types

type Cache

type Cache struct {
	// contains filtered or unexported fields
}

type CacheProxy

type CacheProxy struct {
	// contains filtered or unexported fields
}

func NewCacheProxy

func NewCacheProxy(key string, ttl time.Duration) *CacheProxy

func (CacheProxy) Accept

func (p CacheProxy) Accept(key string) bool

func (CacheProxy) Proxy

func (p CacheProxy) Proxy(c *fiber.Ctx) error

type Limit

type Limit struct {
	// contains filtered or unexported fields
}

type LimitProxy

type LimitProxy struct {
	// contains filtered or unexported fields
}

func NewLimitProxy

func NewLimitProxy(key string, limit int, ttl time.Duration) *LimitProxy

func (LimitProxy) Accept

func (p LimitProxy) Accept(key string) bool

func (LimitProxy) Proxy

func (p LimitProxy) Proxy(c *fiber.Ctx) error

type Proxy

type Proxy interface {
	Accept(key string) bool
	Proxy(c *fiber.Ctx) error
}

Jump to

Keyboard shortcuts

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