Documentation
¶
Index ¶
- func DefaultPolicy() models.Policy
- func RankScores(estimates []models.Estimate, weights models.ScoringWeights) []models.ResolverScore
- func Score(estimate models.Estimate, weights models.ScoringWeights) float64
- type Orchestrator
- type PlacementOrchestrator
- type PlacementPolicy
- type PolicyResolveInput
- type RunInput
- type StaticPolicyResolver
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultPolicy ¶
DefaultPolicy returns the baseline placement policy.
func RankScores ¶
func RankScores(estimates []models.Estimate, weights models.ScoringWeights) []models.ResolverScore
RankScores derives deterministic resolver scores from estimates and weights.
Types ¶
type Orchestrator ¶
type Orchestrator struct {
// contains filtered or unexported fields
}
Orchestrator is the default placement orchestrator implementation.
func NewOrchestrator ¶
func NewOrchestrator(registry *resolvers.Registry, policies PlacementPolicy) *Orchestrator
NewOrchestrator constructs a policy-aware placement orchestrator.
type PlacementOrchestrator ¶
type PlacementOrchestrator interface {
Run(ctx context.Context, input RunInput) (models.Run, error)
}
PlacementOrchestrator executes placement resolvers under policy constraints.
type PlacementPolicy ¶
type PlacementPolicy interface {
Resolve(ctx context.Context, input PolicyResolveInput) (models.Policy, error)
}
PlacementPolicy resolves effective run policy with precedence-aware overrides.
type PolicyResolveInput ¶
type PolicyResolveInput struct {
OrgID string `json:"org_id"`
UserID string `json:"user_id"`
PerRunOverride *models.Policy `json:"per_run_override"`
RegisteredOrder []string `json:"registered_order"`
}
PolicyResolveInput captures precedence context for policy resolution.
type RunInput ¶
type RunInput struct {
RunID string `json:"run_id"`
AgreementID string `json:"agreement_id"`
CreatedByUserID string `json:"created_by_user_id"`
OrgID string `json:"org_id"`
UserID string `json:"user_id"`
PolicyOverride *models.Policy `json:"policy_override"`
DocumentBytes []byte `json:"document_bytes"`
DocumentPageCount int `json:"document_page_count"`
FieldDefinitions []models.FieldDefinition `json:"field_definitions"`
ExistingPlacements []models.ExistingPlacement `json:"existing_placements"`
NativeFormFields []models.NativeFormField `json:"native_form_fields"`
}
RunInput captures a placement execution request.
type StaticPolicyResolver ¶
type StaticPolicyResolver struct {
System models.Policy `json:"system"`
Org map[string]models.Policy `json:"org"`
User map[string]models.Policy `json:"user"`
}
StaticPolicyResolver provides in-memory system/org/user policy overlays.
func NewStaticPolicyResolver ¶
func NewStaticPolicyResolver(system models.Policy) *StaticPolicyResolver
NewStaticPolicyResolver creates a policy resolver with baseline defaults.
func (*StaticPolicyResolver) Resolve ¶
func (r *StaticPolicyResolver) Resolve(_ context.Context, input PolicyResolveInput) (models.Policy, error)
func (*StaticPolicyResolver) SetOrgPolicy ¶
func (r *StaticPolicyResolver) SetOrgPolicy(orgID string, policy models.Policy)
func (*StaticPolicyResolver) SetUserPolicy ¶
func (r *StaticPolicyResolver) SetUserPolicy(userID string, policy models.Policy)