Documentation
¶
Overview ¶
Package compositerouting contains deterministic model selection, without I/O, authentication or quota side effects. Admin and Gateway must use this planner.
Index ¶
Constants ¶
View Source
const ( Priority = "priority" Rules = "rules" Difficulty = "difficulty" )
Variables ¶
This section is empty.
Functions ¶
func AllowedHeader ¶
AllowedHeader excludes credentials and identity headers by construction.
Types ¶
type Condition ¶
type Condition struct {
Type string `json:"type" yaml:"type" mapstructure:"type"`
Key string `json:"key" yaml:"key" mapstructure:"key"`
OpType string `json:"op_type" yaml:"op_type" mapstructure:"op_type"`
Values []string `json:"values" yaml:"values" mapstructure:"values"`
}
Condition deliberately supports only structured business metadata.
type Plan ¶
type Plan struct {
Mode string `json:"mode" yaml:"mode" mapstructure:"mode"`
MatchedRuleID string `json:"matched_rule_id,omitempty" yaml:"matched_rule_id,omitempty" mapstructure:"matched_rule_id,omitempty"`
Target string `json:"target" yaml:"target" mapstructure:"target"`
Reason string `json:"reason" yaml:"reason" mapstructure:"reason"`
}
type Rule ¶
type Rule struct {
ID string `json:"id" yaml:"id" mapstructure:"id"`
Name string `json:"name" yaml:"name" mapstructure:"name"`
Order int `json:"order" yaml:"order" mapstructure:"order"`
Enabled bool `json:"enabled" yaml:"enabled" mapstructure:"enabled"`
RelationType string `json:"relation_type" yaml:"relation_type" mapstructure:"relation_type"`
Conditions []Condition `json:"conditions" yaml:"conditions" mapstructure:"conditions"`
Target string `json:"target" yaml:"target" mapstructure:"target"`
}
Click to show internal directories.
Click to hide internal directories.