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
UserID string
PerRunOverride *models.Policy
RegisteredOrder []string
}
PolicyResolveInput captures precedence context for policy resolution.
type RunInput ¶
type RunInput struct {
RunID string
AgreementID string
CreatedByUserID string
OrgID string
UserID string
PolicyOverride *models.Policy
DocumentBytes []byte
DocumentPageCount int
FieldDefinitions []models.FieldDefinition
ExistingPlacements []models.ExistingPlacement
NativeFormFields []models.NativeFormField
}
RunInput captures a placement execution request.
type StaticPolicyResolver ¶
type StaticPolicyResolver struct {
System models.Policy
Org map[string]models.Policy
User map[string]models.Policy
}
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)