Documentation ¶
Index ¶
Constants ¶
View Source
const ( // AllowedMimeTypesKey is the key to access the allowed mime types config AllowedMimeTypesKey = "allowed-mime-types" // ForbiddenHostnamesKey is the key to access the forbidden hostnames config ForbiddenHostnamesKey = "forbidden-hostnames" // RefreshDelayKey is the key to access the refresh delay config RefreshDelayKey = "refresh-delay" // BlackListThresholdKey is the key to access the blacklist threshold config BlackListThresholdKey = "blacklist-threshold" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlackListThreshold ¶ added in v0.10.0
type BlackListThreshold struct {
Threshold int64 `json:"threshold"`
}
BlackListThreshold is the threshold to reach before blacklisting domain
type Client ¶
type Client interface { GetAllowedMimeTypes() ([]MimeType, error) GetForbiddenHostnames() ([]ForbiddenHostname, error) GetRefreshDelay() (RefreshDelay, error) GetBlackListThreshold() (BlackListThreshold, error) Set(key string, value interface{}) error }
Client is a nice client interface for the ConfigAPI
func NewConfigClient ¶
func NewConfigClient(configAPIURL string, subscriber event.Subscriber, keys []string) (Client, error)
NewConfigClient create a new client for the ConfigAPI.
type ForbiddenHostname ¶
type ForbiddenHostname struct {
Hostname string `json:"hostname"`
}
ForbiddenHostname is the hostnames who's crawling is forbidden
type MimeType ¶
type MimeType struct { // The content-type ContentType string `json:"content-type"` // The list of associated extensions Extensions []string `json:"extensions"` }
MimeType is the mime type as represented in the config
type RefreshDelay ¶
RefreshDelay is the refresh delay for re-crawling
Click to show internal directories.
Click to hide internal directories.