Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommonBucket ¶
type CommonRuleBucket ¶
type CommonRuleBucket struct { CommonBucket Rule string `json:"rule"` RuleExpr expr.Expr }
type HeapData ¶
type HeapData []*HeapDataItem
type HeapDataItem ¶
type HeapDataItem struct {
// contains filtered or unexported fields
}
type Matcher ¶
type Matcher struct { Config string MaxLimit int `json:"ip_max_limit"` DefaultDomain string `json:"default_domain"` WildcardDomainSuffix string `json:"wildcard_domain_suffix"` CommonDispatch struct { ChinaDispatch struct { ChinaTelecom *CommonBucket `json:"china_telecom"` ChinaUnicom *CommonBucket `json:"china_unicom"` CMCC *CommonBucket `json:"cmcc"` ChinaOther *CommonBucket `json:"other"` } `json:"china"` OverseaDispatch []*CommonRuleBucket `json:"oversea"` UnknownAreaDispatch *CommonBucket `json:"unknown"` } `json:"danmaku_common_dispatch"` VIPDispatch []*VIPRuleBucket `json:"danmaku_vip_dispatch"` ServerGroup map[string][]string `json:"danmaku_comet_group"` ServerHost map[string]string `json:"danmaku_comet_host"` IPBlack []string `json:"ip_black"` TempV6 []string `json:"temp_v6"` // contains filtered or unexported fields }
func NewMatcher ¶
func NewMatcher(matcherConfig []byte, ipDataV4 *ipdb.City, ipDataV6 *ipdb.City, dispatchConfig *conf.DispatchConfig) (*Matcher, error)
type MinHeap ¶
type MinHeap struct {
// contains filtered or unexported fields
}
func NewMinHeap ¶
func NewMinHeap() *MinHeap
func (*MinHeap) HeapLength ¶
type MinHeapData ¶
type MinHeapData struct {
HeapData
}
func (MinHeapData) Less ¶
func (d MinHeapData) Less(i, j int) bool
Click to show internal directories.
Click to hide internal directories.