config

package
v0.1.3 Latest Latest
Warning

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

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

Documentation

Overview

Package config handles loading and validating Creel server configuration.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIKeyConfig

type APIKeyConfig struct {
	Name      string `yaml:"name"`
	KeyHash   string `yaml:"key_hash"`
	Principal string `yaml:"principal"` // principal identity this key authenticates as
}

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"`
	Metadata      MetadataConfig      `yaml:"metadata"`
	VectorBackend VectorBackendConfig `yaml:"vector_backend"`
	Embedding     EmbeddingConfig     `yaml:"embedding"`
	Links         LinksConfig         `yaml:"links"`
	Compaction    CompactionConfig    `yaml:"compaction"`
}

Config is the top-level server configuration.

func Load

func Load(path string) (*Config, error)

Load reads a YAML config file and applies environment variable overrides. Environment variables use the CREEL_ prefix with underscores replacing dots and nested keys joined by underscores. For example, CREEL_METADATA_POSTGRES_URL overrides metadata.postgres_url.

type EmbeddingConfig

type EmbeddingConfig struct {
	Provider string `yaml:"provider"`
	Model    string `yaml:"model"`
	APIKey   string `yaml:"api_key"`
}

type LinksConfig

type LinksConfig struct {
	AutoLinkOnIngest  bool    `yaml:"auto_link_on_ingest"`
	AutoLinkThreshold float64 `yaml:"auto_link_threshold"`
	MaxTraversalDepth int     `yaml:"max_traversal_depth"`
}

type MetadataConfig

type MetadataConfig struct {
	PostgresURL string `yaml:"postgres_url"`
}

type OIDCProviderConfig

type OIDCProviderConfig struct {
	Issuer   string `yaml:"issuer"`
	Audience string `yaml:"audience"`
}

OIDCProviderConfig defines a trusted OIDC identity provider. Multiple providers can be configured to support different IdPs simultaneously.

type ServerConfig

type ServerConfig struct {
	GRPCPort    int `yaml:"grpc_port"`
	RESTPort    int `yaml:"rest_port"`
	MetricsPort int `yaml:"metrics_port"`
}

type VectorBackendConfig

type VectorBackendConfig struct {
	Type   string         `yaml:"type"`
	Config map[string]any `yaml:"config"`
}

Jump to

Keyboard shortcuts

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