Documentation
¶
Index ¶
- func Run(ctx context.Context, c Config, logger *slog.Logger) error
- func RunLoop(ctx context.Context, processor Processor, timeout, poll time.Duration) error
- func RunOrphanLoop(ctx context.Context, ticker OrphanTicker, interval, timeout time.Duration, ...) error
- func RunProjectionCleanupLoop(ctx context.Context, ticker ProjectionCleanupTicker, ...) error
- func RunSweepLoop(ctx context.Context, ticker SweepTicker, interval, timeout time.Duration) error
- type ArchiveConfig
- type AuditConfig
- type Config
- type ExtractionConfig
- type ExtractionGateway
- type OrphanTicker
- type Processor
- type ProjectionCleanupConfig
- type ProjectionCleanupTicker
- type RefreshBinding
- type RefreshConfig
- type SweepTicker
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Run ¶
Run owns its pools and runs one explicitly configured tenant and worker mode. It cancels in-flight delivery on shutdown; unacknowledged leases remain retryable.
func RunOrphanLoop ¶
func RunSweepLoop ¶
RunSweepLoop emits the current UTC bucket immediately and then at interval boundaries. Each emission is bounded; outages do not replay historical ticks.
Types ¶
type ArchiveConfig ¶
type ArchiveConfig struct {
Tenant string `json:"tenant"`
Stream string `json:"stream"`
Directory string `json:"directory"`
KeyID string `json:"key_id"`
TrustedKeys map[string]string `json:"trusted_keys"`
}
func (*ArchiveConfig) Validate ¶
func (c *ArchiveConfig) Validate() error
type AuditConfig ¶
type Config ¶
type Config struct {
ProjectionCleanup *ProjectionCleanupConfig `json:"projection_cleanup,omitempty"`
OrphanCleanup *workers.OrphanCleanupConfig `json:"orphan_cleanup,omitempty"`
Telemetry *runtimeconfig.Telemetry `json:"telemetry,omitempty"`
OpenFGATraceContext bool `json:"openfga_trace_context,omitempty"`
Extraction *ExtractionConfig `json:"extraction"`
Refresh *RefreshConfig `json:"refresh"`
Archive *ArchiveConfig `json:"archive"`
Audit AuditConfig `json:"audit"`
Mode string `json:"mode"`
Principal string `json:"principal"`
Projection runtimeconfig.LexicalRoute `json:"projection"`
OpenFGAURL string `json:"openfga_url"`
OpenFGAStore string `json:"openfga_store"`
OpenFGAModel string `json:"openfga_model"`
MaxConnections int32 `json:"max_connections"`
MaxAttempts int `json:"max_attempts"`
LeaseSeconds int `json:"lease_seconds"`
PollMilliseconds int `json:"poll_milliseconds"`
MinBackoffMilliseconds int `json:"min_backoff_milliseconds"`
MaxBackoffSeconds int `json:"max_backoff_seconds"`
DeliveryTimeoutSeconds int `json:"delivery_timeout_seconds"`
}
func LoadConfig ¶
type ExtractionConfig ¶
type ExtractionConfig struct {
Tenant string `json:"tenant"`
Stream string `json:"stream"`
Scheduling *runtimeconfig.ExtractionScheduling `json:"scheduling"`
Gateways []ExtractionGateway `json:"gateways"`
}
func (*ExtractionConfig) Validate ¶
func (c *ExtractionConfig) Validate() error
type ExtractionGateway ¶
type ExtractionGateway struct {
PropagateTraceContext bool `json:"propagate_trace_context,omitempty"`
ProfileID string `json:"profile_id"`
URL string `json:"url"`
TokenEnv string `json:"token_env,omitempty"`
RootCAFile string `json:"root_ca_file,omitempty"`
AllowPlaintextLoopback bool `json:"allow_plaintext_loopback,omitempty"`
}
type OrphanTicker ¶
type OrphanTicker interface {
Tick(context.Context) (workers.OrphanCleanupResult, error)
}
type ProjectionCleanupConfig ¶
type ProjectionCleanupConfig struct {
workers.ProjectionCleanupConfig
Destinations []runtimeconfig.CleanupRoute `json:"destinations"`
}
func (*ProjectionCleanupConfig) Validate ¶
func (c *ProjectionCleanupConfig) Validate() error
type ProjectionCleanupTicker ¶
type ProjectionCleanupTicker interface {
Tick(context.Context) (workers.ProjectionCleanupResult, error)
}
type RefreshBinding ¶
type RefreshConfig ¶
type RefreshConfig struct {
RedactionPolicyVersions []string `json:"redaction_policy_versions,omitempty"`
SweepIntervalMinutes int `json:"sweep_interval_minutes,omitempty"`
Tenant string `json:"tenant"`
Stream string `json:"stream"`
Purpose string `json:"purpose"`
Bindings []RefreshBinding `json:"bindings"`
Profiles []model.ExtractionProfile `json:"profiles"`
MaxConcurrentPerTenant int `json:"max_concurrent_per_tenant"`
DailyTokenBudget int64 `json:"daily_token_budget"`
CostUnit string `json:"cost_unit"`
DailyCostBudgetUnits int64 `json:"daily_cost_budget_units"`
}
func (*RefreshConfig) Validate ¶
func (c *RefreshConfig) Validate() error
type SweepTicker ¶
Click to show internal directories.
Click to hide internal directories.