serverless

package
v0.1.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Phase     string   `json:"phase,omitempty"`
	Functions []string `json:"functions"`
}

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) Config

func (p *Plugin) Config() any

func (*Plugin) Handler

func (p *Plugin) Handler(next http.Handler) http.Handler

func (*Plugin) Init

func (p *Plugin) Init() error

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) PostInit

func (p *Plugin) PostInit() error

func (*Plugin) RunBufferedBodyFilter

func (p *Plugin) RunBufferedBodyFilter(r *http.Request, state *base.ResponseState) error

func (*Plugin) RunHeaderFilter

func (p *Plugin) RunHeaderFilter(r *http.Request, state *base.ResponseState) error

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.

Jump to

Keyboard shortcuts

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