Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MustRegister ¶
func MustRegister(matches TransCoderMatchesFunc)
func RegisterMatcherFatcory ¶
func RegisterMatcherFatcory(typ string, factory MatcherFactory)
Types ¶
type MatcherConfig ¶
type MatcherConfig struct {
MatcherType string `json:"matcher_type,omitempty"`
Config interface{} `json:"config,omitempty"`
}
type MatcherFactory ¶
type MatcherFactory func(config interface{}) RuleMatcher
type RuleInfo ¶
type RuleInfo struct {
Type string `json:"-"`
UpstreamProtocol string `json:"upstream_protocol,omitempty"`
Description string `json:"description,omitempty"`
Config map[string]interface{} `json:"config,omitempty"`
}
func DefaultMatches ¶
type RuleMatcher ¶
func NewMatcher ¶
func NewMatcher(cfg *MatcherConfig) RuleMatcher
type TransCoderMatchesFunc ¶
type TransCoderMatchesFunc func(ctx context.Context, header api.HeaderMap, rules []*TransferRule) (*RuleInfo, bool)
var TransCoderMatches TransCoderMatchesFunc
type TransferRule ¶
type TransferRule struct {
Matcher RuleMatcher
RuleInfo *RuleInfo
}
type TransferRuleConfig ¶
type TransferRuleConfig struct {
MatcherConfig *MatcherConfig `json:"matcher_config,omitempty"`
RuleInfo *RuleInfo `json:"rule_info,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.