Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrIconNotFound is returned when no icon could be fetched for a tracker. ErrIconNotFound = errors.New("tracker icon not found") // ErrInvalidTrackerHost is returned when the requested tracker host is invalid. ErrInvalidTrackerHost = errors.New("invalid tracker host") // ErrFetchingDisabled is returned when tracker icon fetching is disabled by configuration. ErrFetchingDisabled = errors.New("tracker icon fetching is disabled") )
Functions ¶
func QueueFetch ¶
func QueueFetch(host, trackerURL string)
func SetFetchEnabled ¶ added in v1.12.0
func SetFetchEnabled(enabled bool)
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service handles fetching and caching tracker icons on disk.
func NewService ¶
NewService creates a new tracker icon service rooted in the provided data directory.
func (*Service) GetIcon ¶
GetIcon ensures an icon is available for the host (fetching if necessary) and returns the file path.
func (*Service) SetActivityPublisher ¶ added in v1.20.0
SetActivityPublisher wires the qui server-event hub so newly cached tracker icons are pushed to connected clients instead of polled. Safe to call once at startup.
Click to show internal directories.
Click to hide internal directories.