Documentation
¶
Index ¶
- type Config
- type Plugin
- func (p *Plugin) AppliesToResponseSource(source apisixctx.ResponseSource) bool
- func (p *Plugin) Config() any
- func (p *Plugin) Handler(next http.Handler) http.Handler
- func (p *Plugin) Init() error
- func (p *Plugin) LogCapturePolicy() base.LogCapturePolicy
- func (p *Plugin) PostInit() error
- func (p *Plugin) RunBufferedBodyFilter(r *http.Request, state *base.ResponseState) error
- func (p *Plugin) RunHeaderFilter(r *http.Request, state *base.ResponseState) error
- func (p *Plugin) RunLogPhase(snapshot base.LogSnapshot) error
- func (p *Plugin) RunRequestPhase(w http.ResponseWriter, r *http.Request) base.RequestPhaseResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
func (Config) DescribeBindingPhases ¶
func (p Config) DescribeBindingPhases() (base.BindingPhaseDescriptor, error)
DescribeBindingPhases maps the one configured serverless phase to its checked request owner or bounded response callback. The legacy log phase is intentionally left for its later owner.
type Plugin ¶
type Plugin struct {
base.BasePlugin
// contains filtered or unexported fields
}
func NewPostFunction ¶
func NewPostFunction() *Plugin
func NewPreFunction ¶
func NewPreFunction() *Plugin
func (*Plugin) AppliesToResponseSource ¶
func (p *Plugin) AppliesToResponseSource(source apisixctx.ResponseSource) bool
func (*Plugin) LogCapturePolicy ¶
func (p *Plugin) LogCapturePolicy() base.LogCapturePolicy
LogCapturePolicy requests the bounded request/response snapshot that the legacy log-phase callback could observe. Other phases do not participate in detached log capture and therefore keep the zero policy.
func (*Plugin) RunBufferedBodyFilter ¶
func (*Plugin) RunHeaderFilter ¶
func (*Plugin) RunLogPhase ¶
func (p *Plugin) RunLogPhase(snapshot base.LogSnapshot) error
RunLogPhase executes log-phase Lua exactly once against a detached request. Any response-like result is reported as a bounded callback error instead of being applied to the selected response.
func (*Plugin) RunRequestPhase ¶
func (p *Plugin) RunRequestPhase(w http.ResponseWriter, r *http.Request) base.RequestPhaseResult
RunRequestPhase executes rewrite/access/before_proxy functions without invoking downstream request stages itself.