Documentation
¶
Overview ¶
Package runtimecontrol defines database-backed runtime control contracts.
Index ¶
Constants ¶
const ( DefaultCredentialWeight = int64(1) MaxCredentialWeight = int64(1_000_000) DefaultLiveMaxSessions = 32 MaxLiveMaxSessions = 1024 MaxIdentityLength = 256 MaxProviderLength = 64 MaxICEServers = 32 MaxICEURLsPerServer = 16 )
Variables ¶
var ErrRevisionConflict = errors.New("runtime control settings revision conflict")
ErrRevisionConflict reports an expected-revision mismatch without mutation.
Functions ¶
This section is empty.
Types ¶
type CloakingSettings ¶
type CloakingSettings struct {
DisableClaudeModelList bool `json:"disable_claude_model_list"`
DisableCodex bool `json:"disable_codex"`
}
CloakingSettings controls provider compatibility identity behavior.
type CodexLiveSettings ¶
type CodexLiveSettings struct {
Enabled bool `json:"enabled"`
MaxSessions int `json:"max_sessions"`
DisablePrivateRemoteIPs bool `json:"disable_private_remote_ips"`
PublicIP string `json:"public_ip,omitempty"`
UDPPortMin int `json:"udp_port_min"`
UDPPortMax int `json:"udp_port_max"`
ICEServers []ICEServer `json:"ice_servers"`
}
CodexLiveSettings controls the Codex Live media relay.
func (CodexLiveSettings) Validate ¶
func (s CodexLiveSettings) Validate() error
Validate verifies Codex Live relay bounds without activating the relay.
type CredentialRoutingSettings ¶
type CredentialRoutingSettings struct {
Strategy RoutingStrategy `json:"strategy"`
Weights []CredentialWeight `json:"weights"`
}
CredentialRoutingSettings configures credential scheduling and weight overrides.
type CredentialWeight ¶
type CredentialWeight struct {
AuthID string `json:"auth_id"`
Provider string `json:"provider"`
Weight int64 `json:"weight"`
}
CredentialWeight overrides the default weight for one durable credential identity.
type HomeSettings ¶
type HomeSettings struct {
Enabled bool `json:"enabled"`
DisableClusterDiscovery bool `json:"disable_cluster_discovery"`
}
HomeSettings controls local participation in a Home cluster.
type ICEServer ¶
ICEServer configures one STUN or TURN server used by Codex Live. Credential material is intentionally excluded from this foundation contract.
type RoutingStrategy ¶
type RoutingStrategy string
RoutingStrategy selects the credential scheduling policy.
const ( RoutingRoundRobin RoutingStrategy = "round-robin" RoutingWeightedRoundRobin RoutingStrategy = "weighted-round-robin" RoutingFillFirst RoutingStrategy = "fill-first" )
type Settings ¶
type Settings struct {
Revision int64 `json:"revision"`
CredentialRouting CredentialRoutingSettings `json:"credential_routing"`
Cloaking CloakingSettings `json:"cloaking"`
CodexLive CodexLiveSettings `json:"codex_live"`
Home HomeSettings `json:"home"`
CooldownPersistenceEnabled bool `json:"cooldown_persistence_enabled"`
}
Settings contains all database-authoritative runtime controls.
func DefaultSettings ¶
func DefaultSettings() Settings
DefaultSettings returns disabled, backward-compatible runtime controls.
func (Settings) WithDefaults ¶
WithDefaults fills omitted values without enabling a feature.