Documentation
¶
Overview ¶
Package config handles loading and validating Creel server configuration.
Index ¶
Constants ¶
const MaxGRPCMessageSize = 50 * 1024 * 1024
MaxGRPCMessageSize is the maximum gRPC message size (50 MB). Used by the server, CLI, chat, and MCP binaries.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIKeyConfig ¶
type AuthConfig ¶
type AuthConfig struct {
Providers []OIDCProviderConfig `yaml:"providers"`
PrincipalClaim string `yaml:"principal_claim"`
GroupsClaim string `yaml:"groups_claim"`
APIKeys []APIKeyConfig `yaml:"api_keys"`
}
type CompactionConfig ¶
type CompactionConfig struct {
RetainCompactedChunks bool `yaml:"retain_compacted_chunks"`
}
type Config ¶
type Config struct {
Server ServerConfig `yaml:"server"`
Auth AuthConfig `yaml:"auth"`
Postgres PostgresConfig `yaml:"postgres"`
VectorBackend VectorBackendConfig `yaml:"vector_backend"`
Embedding EmbeddingConfig `yaml:"embedding"`
Links LinksConfig `yaml:"links"`
Compaction CompactionConfig `yaml:"compaction"`
EncryptionKey string `yaml:"encryption_key"`
Workers WorkersConfig `yaml:"workers"`
}
Config is the top-level server configuration.
type EmbeddingConfig ¶
type GRPCEndpoint ¶ added in v0.8.0
type GRPCEndpoint struct {
// Host is the host:port target for grpc.NewClient.
Host string
// TLS is true when the scheme is https.
TLS bool
}
GRPCEndpoint holds the parsed components of a gRPC endpoint URL.
func ParseGRPCEndpoint ¶ added in v0.8.0
func ParseGRPCEndpoint(raw string) (GRPCEndpoint, error)
ParseGRPCEndpoint parses a gRPC endpoint string. Accepted formats:
- https://host or https://host:port (TLS, default port 443)
- http://host:port (plaintext, port required)
- host:port (legacy format; plaintext)
type LinksConfig ¶
type OIDCProviderConfig ¶
OIDCProviderConfig defines a trusted OIDC identity provider. Multiple providers can be configured to support different IdPs simultaneously.
type PostgresConfig ¶ added in v0.1.4
type PostgresConfig struct {
Host string `yaml:"host"`
Port int `yaml:"port"`
User string `yaml:"user"`
Password string `yaml:"password"`
Name string `yaml:"name"`
Schema string `yaml:"schema"`
SSLMode string `yaml:"sslmode"`
}
PostgresConfig holds structured PostgreSQL connection parameters.
func PostgresConfigFromEnv ¶ added in v0.1.4
func PostgresConfigFromEnv() *PostgresConfig
PostgresConfigFromEnv builds a PostgresConfig from CREEL_POSTGRES_* environment variables. Returns nil if CREEL_POSTGRES_HOST is not set. Used by integration tests.
func (PostgresConfig) BaseURL ¶ added in v0.1.4
func (p PostgresConfig) BaseURL() string
BaseURL returns the connection string without search_path (for schema creation).
func (PostgresConfig) URL ¶ added in v0.1.4
func (p PostgresConfig) URL() string
URL returns the connection string with search_path set to the configured schema followed by public (so extensions installed in public are accessible).