Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChildrenManager ¶
type ChildrenManager interface { // TryAccept try to accept a new host as child // return result TryAccept(url string, host string) (bool, string) }
ChildrenManager is the
func NewLimitedChildrenManager ¶
func NewLimitedChildrenManager(limit int, expiration time.Duration) ChildrenManager
NewLimitedChildrenManager creator of limited children manager
type HostPicker ¶
type HostPicker interface { // GetHost query url should fetch from which host // returns empty stream shows data should fetch from source // non-empty string present upstream p2p host GetHost(url string) string // PutHost stores query url matching source PutHost(url string, source string) // ResetHost clear up url matched source if exists ResetHost(url string) }
HostPicker is an interface to keep p2p host information
func NewHostPicker ¶
func NewHostPicker(roots []string, pool cache.FileCachePool) HostPicker
NewHostPicker creator of random host picker
Click to show internal directories.
Click to hide internal directories.