Documentation
¶
Index ¶
- Variables
- func ChangePolicy(policy Policy) error
- type Backend
- func (b *Backend) IsHealthy() error
- func (b *Backend) ProxyRequest(ctx *fasthttp.RequestCtx, traceCtx context.Context) (*fasthttp.Response, Releaser, error)
- func (b *Backend) Refresh(entry *model.Entry) error
- func (b *Backend) Request(nilableCtx *fasthttp.RequestCtx, rule *config.Rule, ...) (*fasthttp.Response, Releaser, error)
- func (b *Backend) SetHealth(up bool)
- type Policy
- type Releaser
- type RequestReleaser
- type Upstream
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func ChangePolicy ¶ added in v1.6.0
Types ¶
type Backend ¶
type Backend struct {
// contains filtered or unexported fields
}
func NewBackend ¶
NewBackend creates a new instance of Backend.
func (*Backend) ProxyRequest ¶ added in v1.6.0
type Policy ¶ added in v1.6.0
type Policy string
func ActualPolicy ¶ added in v1.6.0
func ActualPolicy() Policy
type RequestReleaser ¶ added in v1.6.0
type Upstream ¶
type Upstream interface {
Request(nilableCtx *fasthttp.RequestCtx, rule *config.Rule, queries, headers [][2][]byte, traceCtx context.Context) (*fasthttp.Response, Releaser, error)
ProxyRequest(ctx *fasthttp.RequestCtx, traceCtx context.Context) (*fasthttp.Response, Releaser, error)
Refresh(entry *model.Entry) error
IsHealthy() error
}
Upstream defines the interface for external backends. Note: you need provide just one argument of inCtx or inReq.
Click to show internal directories.
Click to hide internal directories.