proxy

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2024 License: MPL-2.0 Imports: 36 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Handlers

func Handlers(lock *sync.RWMutex, cfg *config.ProxyMode, serverURL *url.URL, shutdown chan os.Signal, logger *logrus.Logger, httpClientsPool proxy.Pool, specStorage storage.DBOpenAPILoader, deniedTokens *denylist.DeniedTokens, allowedIPCache *allowiplist.AllowedIPsType, waf coraza.WAF) fasthttp.RequestHandler

func NewHandlerUpdater added in v0.7.4

func NewHandlerUpdater(lock *sync.RWMutex, logger *logrus.Logger, oasStorage storage.DBOpenAPILoader, cfg *config.ProxyMode, serverURL *url.URL, api *fasthttp.Server, shutdown chan os.Signal, pool proxy.Pool, deniedTokens *denylist.DeniedTokens, allowedIPCache *allowiplist.AllowedIPsType, waf coraza.WAF) updater.Updater

NewHandlerUpdater function defines configuration updater controller

Types

type Health

type Health struct {
	Build  string
	Logger *logrus.Logger
	Pool   proxy.Pool
}

func (Health) Liveness

func (h Health) Liveness(ctx *fasthttp.RequestCtx) error

Liveness returns simple status info if the service is alive. If the app is deployed to a Kubernetes cluster, it will also return pod, node, and namespace details via the Downward API. The Kubernetes environment variables need to be set within your Pod/Deployment manifest.

func (Health) Readiness

func (h Health) Readiness(ctx *fasthttp.RequestCtx) error

Readiness checks if the Fasthttp connection pool is ready to handle new requests.

type Specification added in v0.7.4

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

func (*Specification) Find added in v0.7.4

func (s *Specification) Find(rctx *router.Context, schemaID int, method, path string) (router.Handler, error)

Find function searches for the handler by path and method

func (*Specification) Load added in v0.7.4

Load function reads DB file and returns it

func (*Specification) Run added in v0.7.4

func (s *Specification) Run()

Run function performs update of the specification

func (*Specification) Shutdown added in v0.7.4

func (s *Specification) Shutdown() error

Shutdown function stops update process

func (*Specification) Start added in v0.7.4

func (s *Specification) Start() error

Start function starts update process every ConfigurationUpdatePeriod

Jump to

Keyboard shortcuts

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