conf

package
v1.5.5 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type CircuitBreakerConfig

type CircuitBreakerConfig struct {

	// Whether to enable circuit breaker
	// Default: true
	Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"`
	// Maximum number of failures before opening the circuit
	// Default: 5
	MaxFailures int32 `protobuf:"varint,2,opt,name=max_failures,json=maxFailures,proto3" json:"max_failures,omitempty"`
	// Timeout before attempting to close the circuit
	// Default: 60s
	Timeout *durationpb.Duration `protobuf:"bytes,3,opt,name=timeout,proto3" json:"timeout,omitempty"`
	// Maximum number of requests allowed in half-open state
	// Default: 10
	MaxRequests int32 `protobuf:"varint,4,opt,name=max_requests,json=maxRequests,proto3" json:"max_requests,omitempty"`
	// Failure rate threshold (0.0 to 1.0)
	// Default: 0.5 (50%)
	FailureThreshold float64 `protobuf:"fixed64,5,opt,name=failure_threshold,json=failureThreshold,proto3" json:"failure_threshold,omitempty"`
	// contains filtered or unexported fields
}

Circuit breaker configuration

func (*CircuitBreakerConfig) Descriptor deprecated

func (*CircuitBreakerConfig) Descriptor() ([]byte, []int)

Deprecated: Use CircuitBreakerConfig.ProtoReflect.Descriptor instead.

func (*CircuitBreakerConfig) GetEnabled

func (x *CircuitBreakerConfig) GetEnabled() bool

func (*CircuitBreakerConfig) GetFailureThreshold

func (x *CircuitBreakerConfig) GetFailureThreshold() float64

func (*CircuitBreakerConfig) GetMaxFailures

func (x *CircuitBreakerConfig) GetMaxFailures() int32

func (*CircuitBreakerConfig) GetMaxRequests

func (x *CircuitBreakerConfig) GetMaxRequests() int32

func (*CircuitBreakerConfig) GetTimeout

func (x *CircuitBreakerConfig) GetTimeout() *durationpb.Duration

func (*CircuitBreakerConfig) ProtoMessage

func (*CircuitBreakerConfig) ProtoMessage()

func (*CircuitBreakerConfig) ProtoReflect

func (x *CircuitBreakerConfig) ProtoReflect() protoreflect.Message

func (*CircuitBreakerConfig) Reset

func (x *CircuitBreakerConfig) Reset()

func (*CircuitBreakerConfig) String

func (x *CircuitBreakerConfig) String() string

type ConnectionPoolConfig

type ConnectionPoolConfig struct {

	// Maximum number of idle connections
	// Default: 100
	MaxIdleConns int32 `protobuf:"varint,1,opt,name=max_idle_conns,json=maxIdleConns,proto3" json:"max_idle_conns,omitempty"`
	// Maximum number of idle connections per host
	// Default: 10
	MaxIdleConnsPerHost int32 `protobuf:"varint,2,opt,name=max_idle_conns_per_host,json=maxIdleConnsPerHost,proto3" json:"max_idle_conns_per_host,omitempty"`
	// Maximum number of connections per host
	// Default: 100
	MaxConnsPerHost int32 `protobuf:"varint,3,opt,name=max_conns_per_host,json=maxConnsPerHost,proto3" json:"max_conns_per_host,omitempty"`
	// Connection reuse duration
	// Default: 30s
	KeepAliveDuration *durationpb.Duration `protobuf:"bytes,4,opt,name=keep_alive_duration,json=keepAliveDuration,proto3" json:"keep_alive_duration,omitempty"`
	// contains filtered or unexported fields
}

Connection pool configuration

func (*ConnectionPoolConfig) Descriptor deprecated

func (*ConnectionPoolConfig) Descriptor() ([]byte, []int)

Deprecated: Use ConnectionPoolConfig.ProtoReflect.Descriptor instead.

func (*ConnectionPoolConfig) GetKeepAliveDuration

func (x *ConnectionPoolConfig) GetKeepAliveDuration() *durationpb.Duration

func (*ConnectionPoolConfig) GetMaxConnsPerHost

func (x *ConnectionPoolConfig) GetMaxConnsPerHost() int32

func (*ConnectionPoolConfig) GetMaxIdleConns

func (x *ConnectionPoolConfig) GetMaxIdleConns() int32

func (*ConnectionPoolConfig) GetMaxIdleConnsPerHost

func (x *ConnectionPoolConfig) GetMaxIdleConnsPerHost() int32

func (*ConnectionPoolConfig) ProtoMessage

func (*ConnectionPoolConfig) ProtoMessage()

func (*ConnectionPoolConfig) ProtoReflect

func (x *ConnectionPoolConfig) ProtoReflect() protoreflect.Message

func (*ConnectionPoolConfig) Reset

func (x *ConnectionPoolConfig) Reset()

func (*ConnectionPoolConfig) String

func (x *ConnectionPoolConfig) String() string

type CorsConfig

type CorsConfig struct {

	// Whether to enable CORS
	// Default: false
	Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"`
	// Allowed origins
	// Default: ["*"] (when enabled)
	AllowedOrigins []string `protobuf:"bytes,2,rep,name=allowed_origins,json=allowedOrigins,proto3" json:"allowed_origins,omitempty"`
	// Allowed methods
	// Default: ["GET", "POST", "PUT", "DELETE", "OPTIONS"]
	AllowedMethods []string `protobuf:"bytes,3,rep,name=allowed_methods,json=allowedMethods,proto3" json:"allowed_methods,omitempty"`
	// Allowed headers
	// Default: ["*"]
	AllowedHeaders []string `protobuf:"bytes,4,rep,name=allowed_headers,json=allowedHeaders,proto3" json:"allowed_headers,omitempty"`
	// Exposed headers
	// Default: []
	ExposedHeaders []string `protobuf:"bytes,5,rep,name=exposed_headers,json=exposedHeaders,proto3" json:"exposed_headers,omitempty"`
	// Whether to allow credentials
	// Default: false
	AllowCredentials bool `protobuf:"varint,6,opt,name=allow_credentials,json=allowCredentials,proto3" json:"allow_credentials,omitempty"`
	// Max age for preflight requests in seconds
	// Default: 86400 (24 hours)
	MaxAge int32 `protobuf:"varint,7,opt,name=max_age,json=maxAge,proto3" json:"max_age,omitempty"`
	// contains filtered or unexported fields
}

CORS configuration

func (*CorsConfig) Descriptor deprecated

func (*CorsConfig) Descriptor() ([]byte, []int)

Deprecated: Use CorsConfig.ProtoReflect.Descriptor instead.

func (*CorsConfig) GetAllowCredentials

func (x *CorsConfig) GetAllowCredentials() bool

func (*CorsConfig) GetAllowedHeaders

func (x *CorsConfig) GetAllowedHeaders() []string

func (*CorsConfig) GetAllowedMethods

func (x *CorsConfig) GetAllowedMethods() []string

func (*CorsConfig) GetAllowedOrigins

func (x *CorsConfig) GetAllowedOrigins() []string

func (*CorsConfig) GetEnabled

func (x *CorsConfig) GetEnabled() bool

func (*CorsConfig) GetExposedHeaders

func (x *CorsConfig) GetExposedHeaders() []string

func (*CorsConfig) GetMaxAge

func (x *CorsConfig) GetMaxAge() int32

func (*CorsConfig) ProtoMessage

func (*CorsConfig) ProtoMessage()

func (*CorsConfig) ProtoReflect

func (x *CorsConfig) ProtoReflect() protoreflect.Message

func (*CorsConfig) Reset

func (x *CorsConfig) Reset()

func (*CorsConfig) String

func (x *CorsConfig) String() string

type GracefulShutdownConfig

type GracefulShutdownConfig struct {

	// Shutdown timeout
	// Default: 30s
	ShutdownTimeout *durationpb.Duration `protobuf:"bytes,1,opt,name=shutdown_timeout,json=shutdownTimeout,proto3" json:"shutdown_timeout,omitempty"`
	// Whether to wait for ongoing requests
	// Default: true
	WaitForOngoingRequests bool `` /* 132-byte string literal not displayed */
	// Maximum wait time for ongoing requests
	// Default: 60s
	MaxWaitTime *durationpb.Duration `protobuf:"bytes,3,opt,name=max_wait_time,json=maxWaitTime,proto3" json:"max_wait_time,omitempty"`
	// contains filtered or unexported fields
}

Graceful shutdown configuration

func (*GracefulShutdownConfig) Descriptor deprecated

func (*GracefulShutdownConfig) Descriptor() ([]byte, []int)

Deprecated: Use GracefulShutdownConfig.ProtoReflect.Descriptor instead.

func (*GracefulShutdownConfig) GetMaxWaitTime

func (x *GracefulShutdownConfig) GetMaxWaitTime() *durationpb.Duration

func (*GracefulShutdownConfig) GetShutdownTimeout

func (x *GracefulShutdownConfig) GetShutdownTimeout() *durationpb.Duration

func (*GracefulShutdownConfig) GetWaitForOngoingRequests

func (x *GracefulShutdownConfig) GetWaitForOngoingRequests() bool

func (*GracefulShutdownConfig) ProtoMessage

func (*GracefulShutdownConfig) ProtoMessage()

func (*GracefulShutdownConfig) ProtoReflect

func (x *GracefulShutdownConfig) ProtoReflect() protoreflect.Message

func (*GracefulShutdownConfig) Reset

func (x *GracefulShutdownConfig) Reset()

func (*GracefulShutdownConfig) String

func (x *GracefulShutdownConfig) String() string

type Http

type Http struct {

	// Network specifies the network type (e.g., "tcp", "unix")
	// Default: "tcp"
	Network string `protobuf:"bytes,1,opt,name=network,proto3" json:"network,omitempty"`
	// Addr specifies the address to listen on (e.g., ":8080", "localhost:8080")
	// Default: ":8080"
	Addr string `protobuf:"bytes,2,opt,name=addr,proto3" json:"addr,omitempty"`
	// Tls indicates whether TLS/HTTPS is enabled
	// Default: false
	TlsEnable bool `protobuf:"varint,3,opt,name=tls_enable,json=tlsEnable,proto3" json:"tls_enable,omitempty"`
	// TlsAuthType specifies the TLS authentication type:
	// 0: No client auth (default)
	// 1: Request client cert
	// 2: Require client cert
	// 3: Verify client cert
	// 4: Verify client cert if given
	// Default: 0
	TlsAuthType int32 `protobuf:"varint,4,opt,name=tls_auth_type,json=tlsAuthType,proto3" json:"tls_auth_type,omitempty"`
	// Timeout specifies the maximum duration for handling HTTP requests
	// Default: 30s
	Timeout *durationpb.Duration `protobuf:"bytes,5,opt,name=timeout,proto3" json:"timeout,omitempty"`
	// Monitoring configuration
	// Default: all monitoring features enabled
	Monitoring *MonitoringConfig `protobuf:"bytes,6,opt,name=monitoring,proto3" json:"monitoring,omitempty"`
	// Security configuration
	// Default: basic security settings
	Security *SecurityConfig `protobuf:"bytes,7,opt,name=security,proto3" json:"security,omitempty"`
	// Performance configuration
	// Default: optimized for most use cases
	Performance *PerformanceConfig `protobuf:"bytes,8,opt,name=performance,proto3" json:"performance,omitempty"`
	// Middleware configuration
	// Default: all middlewares enabled
	Middleware *MiddlewareConfig `protobuf:"bytes,9,opt,name=middleware,proto3" json:"middleware,omitempty"`
	// Graceful shutdown configuration
	// Default: 30s shutdown timeout
	GracefulShutdown *GracefulShutdownConfig `protobuf:"bytes,10,opt,name=graceful_shutdown,json=gracefulShutdown,proto3" json:"graceful_shutdown,omitempty"`
	// Circuit breaker configuration
	// Default: circuit breaker enabled with default settings
	CircuitBreaker *CircuitBreakerConfig `protobuf:"bytes,11,opt,name=circuit_breaker,json=circuitBreaker,proto3" json:"circuit_breaker,omitempty"`
	// contains filtered or unexported fields
}

Http defines the configuration for the HTTP server plugin

func (*Http) Descriptor deprecated

func (*Http) Descriptor() ([]byte, []int)

Deprecated: Use Http.ProtoReflect.Descriptor instead.

func (*Http) GetAddr

func (x *Http) GetAddr() string

func (*Http) GetCircuitBreaker

func (x *Http) GetCircuitBreaker() *CircuitBreakerConfig

func (*Http) GetGracefulShutdown

func (x *Http) GetGracefulShutdown() *GracefulShutdownConfig

func (*Http) GetMiddleware

func (x *Http) GetMiddleware() *MiddlewareConfig

func (*Http) GetMonitoring

func (x *Http) GetMonitoring() *MonitoringConfig

func (*Http) GetNetwork

func (x *Http) GetNetwork() string

func (*Http) GetPerformance

func (x *Http) GetPerformance() *PerformanceConfig

func (*Http) GetSecurity

func (x *Http) GetSecurity() *SecurityConfig

func (*Http) GetTimeout

func (x *Http) GetTimeout() *durationpb.Duration

func (*Http) GetTlsAuthType

func (x *Http) GetTlsAuthType() int32

func (*Http) GetTlsEnable

func (x *Http) GetTlsEnable() bool

func (*Http) ProtoMessage

func (*Http) ProtoMessage()

func (*Http) ProtoReflect

func (x *Http) ProtoReflect() protoreflect.Message

func (*Http) Reset

func (x *Http) Reset()

func (*Http) String

func (x *Http) String() string

type MiddlewareConfig

type MiddlewareConfig struct {

	// Whether to enable tracing middleware
	// Default: true
	EnableTracing bool `protobuf:"varint,1,opt,name=enable_tracing,json=enableTracing,proto3" json:"enable_tracing,omitempty"`
	// Whether to enable logging middleware
	// Default: true
	EnableLogging bool `protobuf:"varint,2,opt,name=enable_logging,json=enableLogging,proto3" json:"enable_logging,omitempty"`
	// Whether to enable recovery middleware
	// Default: true
	EnableRecovery bool `protobuf:"varint,3,opt,name=enable_recovery,json=enableRecovery,proto3" json:"enable_recovery,omitempty"`
	// Whether to enable validation middleware
	// Default: true
	EnableValidation bool `protobuf:"varint,4,opt,name=enable_validation,json=enableValidation,proto3" json:"enable_validation,omitempty"`
	// Whether to enable rate limiting middleware
	// Default: true
	EnableRateLimit bool `protobuf:"varint,5,opt,name=enable_rate_limit,json=enableRateLimit,proto3" json:"enable_rate_limit,omitempty"`
	// Whether to enable metrics middleware
	// Default: true
	EnableMetrics bool `protobuf:"varint,6,opt,name=enable_metrics,json=enableMetrics,proto3" json:"enable_metrics,omitempty"`
	// Custom middleware configuration (key-value pairs)
	// Default: empty
	CustomMiddleware map[string]string `` /* 183-byte string literal not displayed */
	// contains filtered or unexported fields
}

Middleware configuration

func (*MiddlewareConfig) Descriptor deprecated

func (*MiddlewareConfig) Descriptor() ([]byte, []int)

Deprecated: Use MiddlewareConfig.ProtoReflect.Descriptor instead.

func (*MiddlewareConfig) GetCustomMiddleware

func (x *MiddlewareConfig) GetCustomMiddleware() map[string]string

func (*MiddlewareConfig) GetEnableLogging

func (x *MiddlewareConfig) GetEnableLogging() bool

func (*MiddlewareConfig) GetEnableMetrics

func (x *MiddlewareConfig) GetEnableMetrics() bool

func (*MiddlewareConfig) GetEnableRateLimit

func (x *MiddlewareConfig) GetEnableRateLimit() bool

func (*MiddlewareConfig) GetEnableRecovery

func (x *MiddlewareConfig) GetEnableRecovery() bool

func (*MiddlewareConfig) GetEnableTracing

func (x *MiddlewareConfig) GetEnableTracing() bool

func (*MiddlewareConfig) GetEnableValidation

func (x *MiddlewareConfig) GetEnableValidation() bool

func (*MiddlewareConfig) ProtoMessage

func (*MiddlewareConfig) ProtoMessage()

func (*MiddlewareConfig) ProtoReflect

func (x *MiddlewareConfig) ProtoReflect() protoreflect.Message

func (*MiddlewareConfig) Reset

func (x *MiddlewareConfig) Reset()

func (*MiddlewareConfig) String

func (x *MiddlewareConfig) String() string

type MonitoringConfig

type MonitoringConfig struct {

	// Whether to enable Prometheus metrics
	// Default: true
	EnableMetrics bool `protobuf:"varint,1,opt,name=enable_metrics,json=enableMetrics,proto3" json:"enable_metrics,omitempty"`
	// Metrics endpoint path
	// Default: "/metrics"
	MetricsPath string `protobuf:"bytes,2,opt,name=metrics_path,json=metricsPath,proto3" json:"metrics_path,omitempty"`
	// Health check endpoint path
	// Default: "/health"
	HealthPath string `protobuf:"bytes,3,opt,name=health_path,json=healthPath,proto3" json:"health_path,omitempty"`
	// Whether to enable request logging
	// Default: true
	EnableRequestLogging bool `protobuf:"varint,4,opt,name=enable_request_logging,json=enableRequestLogging,proto3" json:"enable_request_logging,omitempty"`
	// Whether to enable error logging
	// Default: true
	EnableErrorLogging bool `protobuf:"varint,5,opt,name=enable_error_logging,json=enableErrorLogging,proto3" json:"enable_error_logging,omitempty"`
	// Whether to enable detailed route metrics
	// Default: true
	EnableRouteMetrics bool `protobuf:"varint,6,opt,name=enable_route_metrics,json=enableRouteMetrics,proto3" json:"enable_route_metrics,omitempty"`
	// Whether to enable connection metrics
	// Default: true
	EnableConnectionMetrics bool `` /* 133-byte string literal not displayed */
	// Whether to enable queue metrics
	// Default: true
	EnableQueueMetrics bool `protobuf:"varint,8,opt,name=enable_queue_metrics,json=enableQueueMetrics,proto3" json:"enable_queue_metrics,omitempty"`
	// Whether to enable error type metrics
	// Default: true
	EnableErrorTypeMetrics bool `` /* 132-byte string literal not displayed */
	// contains filtered or unexported fields
}

Monitoring configuration

func (*MonitoringConfig) Descriptor deprecated

func (*MonitoringConfig) Descriptor() ([]byte, []int)

Deprecated: Use MonitoringConfig.ProtoReflect.Descriptor instead.

func (*MonitoringConfig) GetEnableConnectionMetrics

func (x *MonitoringConfig) GetEnableConnectionMetrics() bool

func (*MonitoringConfig) GetEnableErrorLogging

func (x *MonitoringConfig) GetEnableErrorLogging() bool

func (*MonitoringConfig) GetEnableErrorTypeMetrics

func (x *MonitoringConfig) GetEnableErrorTypeMetrics() bool

func (*MonitoringConfig) GetEnableMetrics

func (x *MonitoringConfig) GetEnableMetrics() bool

func (*MonitoringConfig) GetEnableQueueMetrics

func (x *MonitoringConfig) GetEnableQueueMetrics() bool

func (*MonitoringConfig) GetEnableRequestLogging

func (x *MonitoringConfig) GetEnableRequestLogging() bool

func (*MonitoringConfig) GetEnableRouteMetrics

func (x *MonitoringConfig) GetEnableRouteMetrics() bool

func (*MonitoringConfig) GetHealthPath

func (x *MonitoringConfig) GetHealthPath() string

func (*MonitoringConfig) GetMetricsPath

func (x *MonitoringConfig) GetMetricsPath() string

func (*MonitoringConfig) ProtoMessage

func (*MonitoringConfig) ProtoMessage()

func (*MonitoringConfig) ProtoReflect

func (x *MonitoringConfig) ProtoReflect() protoreflect.Message

func (*MonitoringConfig) Reset

func (x *MonitoringConfig) Reset()

func (*MonitoringConfig) String

func (x *MonitoringConfig) String() string

type PerformanceConfig

type PerformanceConfig struct {

	// Maximum number of concurrent connections
	// Default: 1000
	MaxConnections int32 `protobuf:"varint,1,opt,name=max_connections,json=maxConnections,proto3" json:"max_connections,omitempty"`
	// Maximum number of concurrent requests
	// Default: 500
	MaxConcurrentRequests int32 `` /* 127-byte string literal not displayed */
	// Read buffer size in bytes
	// Default: 4096 (4KB)
	ReadBufferSize int32 `protobuf:"varint,3,opt,name=read_buffer_size,json=readBufferSize,proto3" json:"read_buffer_size,omitempty"`
	// Write buffer size in bytes
	// Default: 4096 (4KB)
	WriteBufferSize int32 `protobuf:"varint,4,opt,name=write_buffer_size,json=writeBufferSize,proto3" json:"write_buffer_size,omitempty"`
	// Connection pool configuration
	// Default: optimized connection pool settings
	ConnectionPool *ConnectionPoolConfig `protobuf:"bytes,5,opt,name=connection_pool,json=connectionPool,proto3" json:"connection_pool,omitempty"`
	// Read timeout
	// Default: 30s
	ReadTimeout *durationpb.Duration `protobuf:"bytes,6,opt,name=read_timeout,json=readTimeout,proto3" json:"read_timeout,omitempty"`
	// Write timeout
	// Default: 30s
	WriteTimeout *durationpb.Duration `protobuf:"bytes,7,opt,name=write_timeout,json=writeTimeout,proto3" json:"write_timeout,omitempty"`
	// Idle timeout
	// Default: 60s
	IdleTimeout *durationpb.Duration `protobuf:"bytes,8,opt,name=idle_timeout,json=idleTimeout,proto3" json:"idle_timeout,omitempty"`
	// Header read timeout
	// Default: 20s
	ReadHeaderTimeout *durationpb.Duration `protobuf:"bytes,9,opt,name=read_header_timeout,json=readHeaderTimeout,proto3" json:"read_header_timeout,omitempty"`
	// contains filtered or unexported fields
}

Performance configuration

func (*PerformanceConfig) Descriptor deprecated

func (*PerformanceConfig) Descriptor() ([]byte, []int)

Deprecated: Use PerformanceConfig.ProtoReflect.Descriptor instead.

func (*PerformanceConfig) GetConnectionPool

func (x *PerformanceConfig) GetConnectionPool() *ConnectionPoolConfig

func (*PerformanceConfig) GetIdleTimeout

func (x *PerformanceConfig) GetIdleTimeout() *durationpb.Duration

func (*PerformanceConfig) GetMaxConcurrentRequests

func (x *PerformanceConfig) GetMaxConcurrentRequests() int32

func (*PerformanceConfig) GetMaxConnections

func (x *PerformanceConfig) GetMaxConnections() int32

func (*PerformanceConfig) GetReadBufferSize

func (x *PerformanceConfig) GetReadBufferSize() int32

func (*PerformanceConfig) GetReadHeaderTimeout

func (x *PerformanceConfig) GetReadHeaderTimeout() *durationpb.Duration

func (*PerformanceConfig) GetReadTimeout

func (x *PerformanceConfig) GetReadTimeout() *durationpb.Duration

func (*PerformanceConfig) GetWriteBufferSize

func (x *PerformanceConfig) GetWriteBufferSize() int32

func (*PerformanceConfig) GetWriteTimeout

func (x *PerformanceConfig) GetWriteTimeout() *durationpb.Duration

func (*PerformanceConfig) ProtoMessage

func (*PerformanceConfig) ProtoMessage()

func (*PerformanceConfig) ProtoReflect

func (x *PerformanceConfig) ProtoReflect() protoreflect.Message

func (*PerformanceConfig) Reset

func (x *PerformanceConfig) Reset()

func (*PerformanceConfig) String

func (x *PerformanceConfig) String() string

type RateLimitConfig

type RateLimitConfig struct {

	// Whether to enable rate limiting
	// Default: true
	Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"`
	// Rate limit per second
	// Default: 100
	RatePerSecond int32 `protobuf:"varint,2,opt,name=rate_per_second,json=ratePerSecond,proto3" json:"rate_per_second,omitempty"`
	// Burst limit
	// Default: 200
	BurstLimit int32 `protobuf:"varint,3,opt,name=burst_limit,json=burstLimit,proto3" json:"burst_limit,omitempty"`
	// contains filtered or unexported fields
}

Rate limiting configuration

func (*RateLimitConfig) Descriptor deprecated

func (*RateLimitConfig) Descriptor() ([]byte, []int)

Deprecated: Use RateLimitConfig.ProtoReflect.Descriptor instead.

func (*RateLimitConfig) GetBurstLimit

func (x *RateLimitConfig) GetBurstLimit() int32

func (*RateLimitConfig) GetEnabled

func (x *RateLimitConfig) GetEnabled() bool

func (*RateLimitConfig) GetRatePerSecond

func (x *RateLimitConfig) GetRatePerSecond() int32

func (*RateLimitConfig) ProtoMessage

func (*RateLimitConfig) ProtoMessage()

func (*RateLimitConfig) ProtoReflect

func (x *RateLimitConfig) ProtoReflect() protoreflect.Message

func (*RateLimitConfig) Reset

func (x *RateLimitConfig) Reset()

func (*RateLimitConfig) String

func (x *RateLimitConfig) String() string

type SecurityConfig

type SecurityConfig struct {

	// CORS configuration
	// Default: CORS disabled
	Cors *CorsConfig `protobuf:"bytes,1,opt,name=cors,proto3" json:"cors,omitempty"`
	// Request size limit in bytes
	// Default: 10MB (10485760 bytes)
	MaxRequestSize int64 `protobuf:"varint,2,opt,name=max_request_size,json=maxRequestSize,proto3" json:"max_request_size,omitempty"`
	// Rate limiting configuration
	// Default: 100 req/s, burst 200
	RateLimit *RateLimitConfig `protobuf:"bytes,3,opt,name=rate_limit,json=rateLimit,proto3" json:"rate_limit,omitempty"`
	// Security headers configuration
	// Default: security headers disabled
	SecurityHeaders *SecurityHeadersConfig `protobuf:"bytes,4,opt,name=security_headers,json=securityHeaders,proto3" json:"security_headers,omitempty"`
	// contains filtered or unexported fields
}

Security configuration

func (*SecurityConfig) Descriptor deprecated

func (*SecurityConfig) Descriptor() ([]byte, []int)

Deprecated: Use SecurityConfig.ProtoReflect.Descriptor instead.

func (*SecurityConfig) GetCors

func (x *SecurityConfig) GetCors() *CorsConfig

func (*SecurityConfig) GetMaxRequestSize

func (x *SecurityConfig) GetMaxRequestSize() int64

func (*SecurityConfig) GetRateLimit

func (x *SecurityConfig) GetRateLimit() *RateLimitConfig

func (*SecurityConfig) GetSecurityHeaders

func (x *SecurityConfig) GetSecurityHeaders() *SecurityHeadersConfig

func (*SecurityConfig) ProtoMessage

func (*SecurityConfig) ProtoMessage()

func (*SecurityConfig) ProtoReflect

func (x *SecurityConfig) ProtoReflect() protoreflect.Message

func (*SecurityConfig) Reset

func (x *SecurityConfig) Reset()

func (*SecurityConfig) String

func (x *SecurityConfig) String() string

type SecurityHeadersConfig

type SecurityHeadersConfig struct {

	// Whether to enable security headers
	// Default: false
	Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"`
	// Content Security Policy
	// Default: "default-src 'self'"
	ContentSecurityPolicy string `` /* 126-byte string literal not displayed */
	// X-Frame-Options
	// Default: "DENY"
	XFrameOptions string `protobuf:"bytes,3,opt,name=x_frame_options,json=xFrameOptions,proto3" json:"x_frame_options,omitempty"`
	// X-Content-Type-Options
	// Default: "nosniff"
	XContentTypeOptions string `protobuf:"bytes,4,opt,name=x_content_type_options,json=xContentTypeOptions,proto3" json:"x_content_type_options,omitempty"`
	// X-XSS-Protection
	// Default: "1; mode=block"
	XXssProtection string `protobuf:"bytes,5,opt,name=x_xss_protection,json=xXssProtection,proto3" json:"x_xss_protection,omitempty"`
	// contains filtered or unexported fields
}

Security headers configuration

func (*SecurityHeadersConfig) Descriptor deprecated

func (*SecurityHeadersConfig) Descriptor() ([]byte, []int)

Deprecated: Use SecurityHeadersConfig.ProtoReflect.Descriptor instead.

func (*SecurityHeadersConfig) GetContentSecurityPolicy

func (x *SecurityHeadersConfig) GetContentSecurityPolicy() string

func (*SecurityHeadersConfig) GetEnabled

func (x *SecurityHeadersConfig) GetEnabled() bool

func (*SecurityHeadersConfig) GetXContentTypeOptions

func (x *SecurityHeadersConfig) GetXContentTypeOptions() string

func (*SecurityHeadersConfig) GetXFrameOptions

func (x *SecurityHeadersConfig) GetXFrameOptions() string

func (*SecurityHeadersConfig) GetXXssProtection

func (x *SecurityHeadersConfig) GetXXssProtection() string

func (*SecurityHeadersConfig) ProtoMessage

func (*SecurityHeadersConfig) ProtoMessage()

func (*SecurityHeadersConfig) ProtoReflect

func (x *SecurityHeadersConfig) ProtoReflect() protoreflect.Message

func (*SecurityHeadersConfig) Reset

func (x *SecurityHeadersConfig) Reset()

func (*SecurityHeadersConfig) String

func (x *SecurityHeadersConfig) String() string

Jump to

Keyboard shortcuts

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