Documentation
¶
Index ¶
- func SortItems(items []BatchItem, sortBy string) error
- func ValidateFilterMode(filter string) error
- func ValidateSortMode(sortBy string) error
- type BatchEngine
- type BatchItem
- type BatchResult
- type BatchSummary
- type CheckFunc
- type CollisionSource
- type DedupeResult
- type ProgressFunc
- type SourceEndpoint
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateFilterMode ¶
func ValidateSortMode ¶
Types ¶
type BatchEngine ¶
type BatchEngine struct {
Workers int
Timeout time.Duration
Providers []abuse.Provider
Abuse bool
Checker CheckFunc
SortBy string
Filter string
Progress ProgressFunc
}
func (*BatchEngine) Run ¶
func (e *BatchEngine) Run(ctx context.Context, endpoints []endpoint.Endpoint) (*BatchResult, error)
type BatchItem ¶
type BatchResult ¶
type BatchResult struct {
Items []BatchItem `json:"items"`
Summary BatchSummary `json:"summary"`
}
type BatchSummary ¶
type BatchSummary struct {
Total int `json:"total"`
Processed int `json:"processed"`
Reachable int `json:"reachable"`
Unreachable int `json:"unreachable"`
Abusive int `json:"abusive"`
Suspicious int `json:"suspicious"`
Clean int `json:"clean"`
AvgLatency int64 `json:"avg_latency_ms"`
Errors int `json:"errors"`
}
func Summarize ¶
func Summarize(items []BatchItem) BatchSummary
type CollisionSource ¶
type DedupeResult ¶
type DedupeResult struct {
Unique []endpoint.Endpoint `json:"unique"`
Collisions map[string][]CollisionSource `json:"collisions,omitempty"`
UniqueCount int `json:"unique_count"`
TotalCount int `json:"total_count"`
}
func Dedupe ¶
func Dedupe(inputs []SourceEndpoint) DedupeResult
func DedupeFiles ¶
func DedupeFiles(paths []string) (DedupeResult, error)
type ProgressFunc ¶
type ProgressFunc func(processed, total int)
type SourceEndpoint ¶
type SourceEndpoint struct {
Endpoint endpoint.Endpoint
Source CollisionSource
}
func ParseFile ¶
func ParseFile(path string) ([]SourceEndpoint, error)
func ParseReader ¶
func ParseReader(r io.Reader, sourceName string) ([]SourceEndpoint, error)
Click to show internal directories.
Click to hide internal directories.