Documentation
¶
Overview ¶
Package optimization connects governed Cortex lessons to Fabriq.
Index ¶
- func LessonSpec(name string) registry.EntitySpec
- func LessonWritePolicy(name string) agent.WritePolicy
- type Adapter
- func (a *Adapter) CheckReady(ctx context.Context) error
- func (a *Adapter) Deliver(ctx context.Context, request opt.Publication) (opt.PublicationReceipt, error)
- func (a *Adapter) Publish(ctx context.Context, lesson opt.Lesson) (opt.PublicationReceipt, error)
- func (a *Adapter) Recall(ctx context.Context, request opt.RecallQuery) (opt.LessonPage, error)
- func (a *Adapter) Revoke(ctx context.Context, lessonID id.ID, revision int64) error
- type Config
- type LessonToolkit
- type ScopeBinding
- type ScopeMapper
- type ScopeMapperFunc
- type Toolkit
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LessonSpec ¶
func LessonSpec(name string) registry.EntitySpec
LessonSpec shares the physical lesson schema across governed producers.
func LessonWritePolicy ¶
func LessonWritePolicy(name string) agent.WritePolicy
LessonWritePolicy permits guarded creation and revision of this entity.
Types ¶
type Adapter ¶
type Adapter struct {
// contains filtered or unexported fields
}
Adapter implements governed lesson delivery and recall.
func NewLessonStore ¶
func NewLessonStore(toolkit Toolkit, fabric query.Fabric, mapper ScopeMapper, config Config) (*Adapter, error)
NewLessonStore constructs the adapter without starting background work.
func (*Adapter) CheckReady ¶
CheckReady verifies provisioned columns, the bound toolkit policy and semantic retrieval without writing a lesson. Destination write grants are exercised by actual delivery; this probe does not claim a test write occurred.
func (*Adapter) Deliver ¶
func (a *Adapter) Deliver(ctx context.Context, request opt.Publication) (opt.PublicationReceipt, error)
Deliver reconciles a durable publication with authoritative destination state.
func (*Adapter) Publish ¶
Publish delivers an already accepted local lesson. The outbox remains authoritative.
func (*Adapter) Recall ¶
func (a *Adapter) Recall(ctx context.Context, request opt.RecallQuery) (opt.LessonPage, error)
Recall returns a bounded semantic result set. A nonempty cursor is refused: changing search rankings cannot supply a stable continuation. Missing required search channels or token-truncated results return ErrIncompleteEvidence.
type Config ¶
type Config struct {
Entity string
Repository opt.Repository
Authorizer opt.Authorizer
IdentityResolver opt.IdentityResolver
Now func() time.Time
}
Config supplies local evidence and current host authority.
type LessonToolkit ¶
type LessonToolkit = lessontransport.Toolkit
LessonToolkit binds the shared typed schema and guarded recall policy.
type ScopeBinding ¶
ScopeBinding maps one authenticated Cortex scope into a Fabriq tenant.
type ScopeMapper ¶
ScopeMapper resolves a tenant without changing the caller's exact Cortex scope.
type ScopeMapperFunc ¶
ScopeMapperFunc adapts a host mapping function.
func (ScopeMapperFunc) Map ¶
func (f ScopeMapperFunc) Map(ctx context.Context, s cortex.Scope) (ScopeBinding, error)
Map delegates to the host mapping function.