batch_requests

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: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultURI = "/apisix/batch-requests"
)

Variables

This section is empty.

Functions

func NewHandler

func NewHandler(dispatcher http.Handler) http.Handler

func NewHandlerWithLimits

func NewHandlerWithLimits(dispatcher http.Handler, limits Limits) http.Handler

Types

type Config

type Config struct{}

type ErrorResponse

type ErrorResponse struct {
	ErrorMessage string `json:"error_msg"`
}

type Limits

type Limits struct {
	MaxBodySize         int64 `json:"max_body_size,omitempty"`
	MaxResponseBodySize int64 `json:"max_response_body_size,omitempty"`
	MaxPipelineItems    int   `json:"max_pipeline_items,omitempty"`
	MaxConcurrency      int   `json:"max_concurrency,omitempty"`
}

type PipelineRequest

type PipelineRequest struct {
	Version   float64           `json:"version,omitempty"`
	Method    string            `json:"method,omitempty"`
	Path      string            `json:"path"`
	Query     map[string]string `json:"query,omitempty"`
	Headers   map[string]string `json:"headers,omitempty"`
	Body      string            `json:"body,omitempty"`
	SSLVerify bool              `json:"ssl_verify,omitempty"`
}

type PipelineResponse

type PipelineResponse struct {
	Status  int               `json:"status"`
	Reason  string            `json:"reason"`
	Headers map[string]string `json:"headers,omitempty"`
	Body    string            `json:"body,omitempty"`
}

type Plugin

type Plugin struct {
	base.BasePlugin
	// contains filtered or unexported fields
}

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

func (p *Plugin) PostInit() error

type Request

type Request struct {
	Query    map[string]string `json:"query,omitempty"`
	Headers  map[string]string `json:"headers,omitempty"`
	Timeout  *int              `json:"timeout,omitempty"`
	Pipeline []PipelineRequest `json:"pipeline"`
}

Jump to

Keyboard shortcuts

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