Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func LoadFromEnv ¶
LoadFromEnv loads configuration values from environment variables. Flag names are converted to uppercase with underscores (e.g., metrics-bind-address -> METRICS_BIND_ADDRESS).
func Start ¶
func Start(getExtensionConfig GetExtensionConfig, migrationRunner MigrationRunner)
Types ¶
type BootstrapConfig ¶
type Config ¶
type Config struct {
Metrics struct {
Addr string
CertPath string
CertName string
CertKey string
}
Webhook struct {
CertPath string
CertName string
CertKey string
}
Streaming struct {
MaxBufSize resource.QuantityValue `default:"1Mi"`
InitialBufSize resource.QuantityValue `default:"4Ki"`
Timeout time.Duration `default:"60s"`
}
Proxy struct {
URL string
}
Auth struct {
Mode string
UserIDClaim string
}
LeaderElection bool
ProbeAddr string
SecureMetrics bool
EnableHTTP2 bool
DefaultModelConfig types.NamespacedName
HttpServerAddr string
WatchNamespaces string
A2ABaseUrl string
Database struct {
Url string
UrlFile string
VectorEnabled bool
}
}
type CtrlManagerConfigFunc ¶
type ExtensionConfig ¶
type ExtensionConfig struct {
Authenticator auth.AuthProvider
Authorizer auth.Authorizer
AgentPlugins []agent_translator.TranslatorPlugin
MCPServerPlugins []translator.MCPTranslatorPlugin
SandboxBackend sandboxbackend.Backend
}
type GetExtensionConfig ¶
type GetExtensionConfig func(bootstrap BootstrapConfig) (*ExtensionConfig, error)
type MapValue ¶
MapValue implements flag.Value for a map[string]string. It parses comma-separated key=value pairs (e.g. "team=platform,env=prod").
type MigrationRunner ¶
MigrationRunner applies database migrations given the resolved connection URL. vectorEnabled mirrors the --database-vector-enabled flag; custom runners can use it to conditionally apply vector-specific migrations. Returning a non-nil error causes the app to exit.
Pass nil to Start to use the default migration runner (migrations.RunUp with migrations.FS). Provide a custom runner to take over the migration process entirely — for example, to run additional enterprise migrations alongside or instead of the built-in ones. Custom runners that want to include the built-in migrations can call migrations.RunUp directly.