envoy

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// BodyByteLimit is the max limit of 62Kb per streamed chunk.
	// Certain envoy implementations set a max limit of 64Kb per streamed chunk, intentionally setting this lower for a safe margin.
	BodyByteLimit = 62000
)

Variables

This section is empty.

Functions

func AddStreamedResponseBody

func AddStreamedResponseBody(responses []*eppb.ProcessingResponse, responseBodyBytes []byte) []*eppb.ProcessingResponse

AddStreamedResponseBody splits responseBodyBytes into chunked body responses and appends them as ResponseBody ProcessingResponses, mirroring GenerateRequestBodyResponses for the request path.

func BuildChunkedBodyResponses

func BuildChunkedBodyResponses(bodyBytes []byte, setEos bool) []*extProcPb.CommonResponse

BuildChunkedBodyResponses splits the bodyBytes into chunks of size BodyByteLimit and returns a slice of CommonResponse. If setEos is true, the last chunk will have EndOfStream set to true.

func ExtractHeaderValue

func ExtractHeaderValue(req *extProcPb.ProcessingRequest_RequestHeaders, headerKey string) string

ExtractHeaderValue searches for a specific header key in the processing request and returns its value. The lookup is case-insensitive. Returns an empty string if the header is missing or if the request structure is nil.

func ExtractMetadataValues

func ExtractMetadataValues(req *extProcPb.ProcessingRequest) map[string]any

func GenerateHeadersMutation

func GenerateHeadersMutation(headers map[string]string) []*corev3.HeaderValueOption

func GenerateRequestBodyResponses

func GenerateRequestBodyResponses(requestBodyBytes []byte) []*extProcPb.ProcessingResponse

GenerateRequestBodyResponses splits the request body bytes into chunked body responses and wraps each chunk in a ProcessingResponse_RequestBody envelope.

func GetHeaderValue

func GetHeaderValue(header *corev3.HeaderValue) string

GetHeaderValue safely extracts the string value from an Envoy HeaderValue field.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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