Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ButlerConfig ¶
type ButlerConfig struct {
Enabled *bool `json:"enabled"` // nil treated as true (kill switch)
Capabilities Capabilities `json:"capabilities"`
DocPaths []string `json:"doc_paths"`
Upstream []UpstreamDep `json:"upstream"`
Synthesis SynthesisConfig `json:"synthesis"`
ShadowRepo string `json:"shadow_repo"`
Thresholds map[string]float64 `json:"thresholds"`
MaxDailyLLMCalls int `json:"max_daily_llm_calls"`
}
func DefaultConfig ¶
func DefaultConfig() ButlerConfig
func Parse ¶
func Parse(data []byte) (ButlerConfig, error)
func (ButlerConfig) IsEnabled ¶
func (c ButlerConfig) IsEnabled() bool
IsEnabled returns false only when Enabled is explicitly set to false.
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
Cache provides a TTL-based cache for butler config.
func (*Cache) Get ¶
func (c *Cache) Get() (ButlerConfig, error)
Get returns the cached config, fetching it if the cache is stale or empty.
func (*Cache) Invalidate ¶
func (c *Cache) Invalidate()
Invalidate forces the next Get() call to re-fetch.
type Capabilities ¶
type FetchFunc ¶
FetchFunc fetches the raw config file content. Returns nil, nil if the file doesn't exist.