Versions in this module Expand all Collapse all v0 v0.12.0 Nov 29, 2026 Changes in this version + func ValidateConfig(cfg *Config) error + func WriteError(w http.ResponseWriter, code ClientError, status int) + type AddrList []string + func (a *AddrList) UnmarshalYAML(value *yaml.Node) error + type AdminConfig struct + BindAddr string + EnablePprof bool + HeaderTimeout time.Duration + Port int + Timeout time.Duration + type AggregationConfig struct + BestEffort bool + OnConflict *OnConflictConfig + Strategy string + type ByteSize int64 + const GiB + const KiB + const MiB + func ParseByteSize(s string) (ByteSize, error) + func (b *ByteSize) UnmarshalYAML(value *yaml.Node) error + func (b ByteSize) MarshalYAML() (any, error) + func (b ByteSize) String() string + type CircuitBreakerConfig struct + Enabled bool + MaxFailures int + ResetTimeout time.Duration + type ClientError string + const ClientErrAborted + const ClientErrInternal + const ClientErrPayloadTooLarge + const ClientErrRateLimitExceeded + const ClientErrUnauthorized + const ClientErrUpstreamBodyTooLarge + const ClientErrUpstreamClientError + const ClientErrUpstreamError + const ClientErrUpstreamMalformed + const ClientErrUpstreamRedirect + const ClientErrUpstreamUnavailable + const ClientErrValueConflict + func (err ClientError) String() string + type Config struct + Debug bool + Gateway GatewayConfig + Schema string + func LoadConfig(path string) (Config, error) + func (c *Config) Marshal() ([]byte, error) + func (c *Config) WriteTo(w io.Writer) (int64, error) + type FlowConfig struct + Aggregation *AggregationConfig + Method string + Middlewares []MiddlewareConfig + Path string + Plugins []PluginConfig + RequestBody RequestBodyConfig + Streaming bool + Upstreams []UpstreamConfig + type GatewayConfig struct + Admin AdminConfig + Observability ObservabilityConfig + Routing RoutingConfig + Server ServerConfig + Service ServiceConfig + type LoadBalancingConfig struct + Mode string + type MetricsConfig struct + Enabled bool + Exporter string + OTLP OTLPConfig + type MiddlewareConfig struct + Config map[string]interface{} + Name string + Path string + Source string + type OTLPConfig struct + Endpoint string + Insecure bool + Interval time.Duration + type ObservabilityConfig struct + Metrics MetricsConfig + Tracing TracingConfig + type OnConflictConfig struct + Policy string + Upstream string + type PluginConfig struct + Config map[string]interface{} + Name string + Path string + Source string + type PolicyConfig struct + CircuitBreakerConfig CircuitBreakerConfig + FollowRedirects bool + HeaderBlacklist []string + LoadBalancingConfig LoadBalancingConfig + MaxResponseBodySize int64 + RequireBody bool + RetryConfig RetryConfig + type ProblemDetails struct + Detail string + Errors []ClientError + Status int + Title string + Type string + type RateLimiterConfig struct + Config map[string]interface{} + Enabled bool + type RequestBodyConfig struct + MaxSize ByteSize + MemoryLimit ByteSize + ReadTimeout time.Duration + type RetryConfig struct + BackoffDelay time.Duration + MaxRetries int + RetryOnStatuses []int + type Router struct + func (r *Router) Close() error + func (r *Router) ServeHTTP(w http.ResponseWriter, req *http.Request) + type RouterBundle struct + MeterProvider otelcommon.Provider + PromRegistry *prometheus.Registry + Router *Router + TLSRegistry *tlsutil.Registry + TracerProvider otelcommon.Provider + func NewRouter(ctx context.Context, cfgSet RoutingConfigSet, log *zap.Logger) (RouterBundle, error) + type RoutingConfig struct + Flows []FlowConfig + RateLimiter RateLimiterConfig + TrustedProxies []string + type RoutingConfigSet struct + Metrics MetricsConfig + Routing RoutingConfig + Service ServiceConfig + ServiceVersion string + TempDir string + Tracing TracingConfig + type ServerConfig struct + HTTP2 string + HeaderTimeout time.Duration + Port int + TLS ServerTLSConfig + TempDir string + Timeout time.Duration + type ServerTLSConfig struct + CertFile string + ClientAuth string + ClientCAFile string + Enabled bool + KeyFile string + MinVersion string + type ServiceConfig struct + Name string + type TLSConfig struct + CAFile string + CertFile string + Enabled bool + InsecureSkipVerify bool + KeyFile string + MinVersion string + ServerName string + type TracingConfig struct + Enabled bool + Exporter string + OTLP OTLPConfig + SamplingRatio float64 + type TransportConfig struct + HTTP2 string + IdleConnTimeout time.Duration + MaxIdleConns int + MaxIdleConnsPerHost int + type UpstreamConfig struct + ForwardHeaders []string + ForwardParams []string + ForwardQueries []string + Hosts AddrList + Method string + Name string + Path string + Policy PolicyConfig + TLS TLSConfig + Timeout time.Duration + Transport TransportConfig + func DefaultUpstreamConfig() UpstreamConfig