Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthConfig ¶
AuthConfig holds authentication settings.
type Config ¶
type Config struct {
Server ServerConfig `koanf:"server"`
Runtime RuntimeConfig `koanf:"runtime"`
Sandbox SandboxConfig `koanf:"sandbox"`
Store StoreConfig `koanf:"store"`
Auth AuthConfig `koanf:"auth"`
Log LogConfig `koanf:"log"`
S3 S3Config `koanf:"s3"`
Resource ResourceConfig `koanf:"resource"`
}
Config holds all configuration for the den server.
func DefaultConfig ¶
func DefaultConfig() *Config
DefaultConfig returns a Config with sensible defaults.
type LogConfig ¶
type LogConfig struct {
Level string `koanf:"level"` // "debug", "info", "warn", "error"
Format string `koanf:"format"` // "text", "json"
}
LogConfig holds logging settings.
type ResourceConfig ¶ added in v0.0.6
type ResourceConfig struct {
OvercommitRatio float64 `koanf:"overcommit_ratio"`
PressureThreshold float64 `koanf:"pressure_threshold"`
CriticalThreshold float64 `koanf:"critical_threshold"`
MonitorInterval time.Duration `koanf:"monitor_interval"`
EnableAutoThrottle bool `koanf:"enable_auto_throttle"`
MinMemoryFloor int64 `koanf:"min_memory_floor"`
}
ResourceConfig holds shared resource management settings.
type RuntimeConfig ¶
type RuntimeConfig struct {
Backend string `koanf:"backend"` // "docker"
DockerHost string `koanf:"docker_host"`
NetworkID string `koanf:"network_id"`
}
RuntimeConfig holds runtime backend settings.
type S3Config ¶
type S3Config struct {
Endpoint string `koanf:"endpoint"`
Region string `koanf:"region"`
AccessKey string `koanf:"access_key"`
SecretKey string `koanf:"secret_key"`
}
S3Config holds server-wide S3 defaults.
type SandboxConfig ¶
type SandboxConfig struct {
DefaultImage string `koanf:"default_image"`
DefaultTimeout time.Duration `koanf:"default_timeout"`
MaxSandboxes int `koanf:"max_sandboxes"`
DefaultCPU int64 `koanf:"default_cpu"` // NanoCPUs
DefaultMemory int64 `koanf:"default_memory"` // bytes
DefaultPidLimit int64 `koanf:"default_pid_limit"`
WarmPoolSize int `koanf:"warm_pool_size"`
AllowVolumes bool `koanf:"allow_volumes"`
AllowS3 bool `koanf:"allow_s3"`
AllowS3FUSE bool `koanf:"allow_s3_fuse"`
AllowHostBinds bool `koanf:"allow_host_binds"`
MaxVolumesPerSandbox int `koanf:"max_volumes_per_sandbox"`
DefaultTmpfs []TmpfsDefault `koanf:"default_tmpfs"`
}
SandboxConfig holds default sandbox settings.
type ServerConfig ¶
type ServerConfig struct {
Host string `koanf:"host"`
Port int `koanf:"port"`
AllowedOrigins []string `koanf:"allowed_origins"`
RateLimitRPS float64 `koanf:"rate_limit_rps"`
RateLimitBurst int `koanf:"rate_limit_burst"`
TLS struct {
Enabled bool `koanf:"enabled"`
CertFile string `koanf:"cert_file"`
KeyFile string `koanf:"key_file"`
} `koanf:"tls"`
}
ServerConfig holds HTTP server settings.
type StoreConfig ¶
type StoreConfig struct {
Path string `koanf:"path"`
}
StoreConfig holds state persistence settings.
type TmpfsDefault ¶
TmpfsDefault defines a default tmpfs mount.
Click to show internal directories.
Click to hide internal directories.