internal/

directory
v0.74.0-rc.2 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2026 License: BSD-3-Clause, AGPL-3.0

Directories

Path Synopsis
Package certwatch watches TLS certificate files on disk and provides a hot-reloading GetCertificate callback for tls.Config.
Package certwatch watches TLS certificate files on disk and provides a hot-reloading GetCertificate callback for tls.Config.
Package crowdsec provides a CrowdSec stream bouncer that maintains a local decision cache for IP reputation checks.
Package crowdsec provides a CrowdSec stream bouncer that maintains a local decision cache for IP reputation checks.
Package debug provides HTTP debug endpoints and CLI client for the proxy server.
Package debug provides HTTP debug endpoints and CLI client for the proxy server.
Package flock provides best-effort advisory file locking using flock(2).
Package flock provides best-effort advisory file locking using flock(2).
Package geolocation provides IP-to-country lookups using MaxMind GeoLite2 databases.
Package geolocation provides IP-to-country lookups using MaxMind GeoLite2 databases.
Package grpc provides gRPC utilities for the proxy client.
Package grpc provides gRPC utilities for the proxy client.
Package health provides health probes for the proxy server.
Package health provides health probes for the proxy server.
Package k8s provides a lightweight Kubernetes API client for coordination Leases.
Package k8s provides a lightweight Kubernetes API client for coordination Leases.
llm
Package llm provides the shared LLM request and response parsing library consumed by proxy middleware.
Package llm provides the shared LLM request and response parsing library consumed by proxy middleware.
pricing
Package pricing implements the embedded-default + override pricing table shared by middleware that converts LLM token usage into a USD cost estimate.
Package pricing implements the embedded-default + override pricing table shared by middleware that converts LLM token usage into a USD cost estimate.
Package middleware defines the per-target middleware chain that runs inside the reverse proxy hot path.
Package middleware defines the per-target middleware chain that runs inside the reverse proxy hot path.
bodytap
Package bodytap owns the framework-side body capture used by the middleware chain.
Package bodytap owns the framework-side body capture used by the middleware chain.
builtin
Package builtin holds the package-level middleware registry that concrete middleware packages register themselves into via init().
Package builtin holds the package-level middleware registry that concrete middleware packages register themselves into via init().
builtin/cost_meter
Package cost_meter implements the SlotOnResponse middleware that converts token-usage metadata emitted by llm_response_parser into a per-request USD cost estimate.
Package cost_meter implements the SlotOnResponse middleware that converts token-usage metadata emitted by llm_response_parser into a per-request USD cost estimate.
builtin/llm_guardrail
Package llm_guardrail implements the SlotOnRequest middleware that enforces the per-target LLM guardrail policy: a model allowlist check and an opt-in prompt-capture step that may run a PII redactor before emitting the prompt into the metadata bag.
Package llm_guardrail implements the SlotOnRequest middleware that enforces the per-target LLM guardrail policy: a model allowlist check and an opt-in prompt-capture step that may run a PII redactor before emitting the prompt into the metadata bag.
builtin/llm_identity_inject
Package llm_identity_inject implements the SlotOnRequest middleware that stamps the caller's NetBird identity onto upstream LLM-gateway requests.
Package llm_identity_inject implements the SlotOnRequest middleware that stamps the caller's NetBird identity onto upstream LLM-gateway requests.
builtin/llm_limit_check
Package llm_limit_check is the SlotOnRequest middleware that asks management which agent-network policy "pays" for the current LLM request.
Package llm_limit_check is the SlotOnRequest middleware that asks management which agent-network policy "pays" for the current LLM request.
builtin/llm_limit_record
Package llm_limit_record is the SlotOnResponse middleware that posts the served request's token + cost deltas back to management so the per-(user, group, window) consumption counters tick.
Package llm_limit_record is the SlotOnResponse middleware that posts the served request's token + cost deltas back to management so the per-(user, group, window) consumption counters tick.
builtin/llm_request_parser
Package llm_request_parser implements the SlotOnRequest middleware that detects the LLM provider from the request URL, parses the JSON request body for model and streaming flags, and extracts the user prompt text.
Package llm_request_parser implements the SlotOnRequest middleware that detects the LLM provider from the request URL, parses the JSON request body for model and streaming flags, and extracts the user prompt text.
builtin/llm_response_parser
Package llm_response_parser implements the SlotOnResponse middleware that decodes OpenAI- and Anthropic-shaped LLM responses (buffered or streaming) and emits token usage and completion metadata.
Package llm_response_parser implements the SlotOnResponse middleware that decodes OpenAI- and Anthropic-shaped LLM responses (buffered or streaming) and emits token usage and completion metadata.
builtin/llm_router
Package llm_router implements the SlotOnRequest middleware that routes a request to an upstream LLM provider based on the model name emitted upstream by llm_request_parser.
Package llm_router implements the SlotOnRequest middleware that routes a request to an upstream LLM provider based on the model name emitted upstream by llm_request_parser.
Package restrict provides connection-level access control based on IP CIDR ranges and geolocation (country codes).
Package restrict provides connection-level access control based on IP CIDR ranges and geolocation (country codes).
Package types defines common types used across the proxy package.
Package types defines common types used across the proxy package.

Jump to

Keyboard shortcuts

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