2 """The main apt-dht modules.
4 Diagram of the interaction between the given modules::
6 +---------------+ +-----------------------------------+ +-------------
7 | AptDHT | | DHT | | Internet
8 | |--->|join DHT|----|--\
9 | |--->|loadConfig | | | Another
10 | |--->|getValue | | | Node
11 | |--->|storeValue DHT|<---|--/
13 | | +-----------------------------------+ |
14 | | +-------------+ +----------------+ |
15 | | | PeerManager | | HTTPDownloader*| |
16 | |--->|get |--->|get HTTP|----|---> Mirror
17 | | | |--->|getRange | |
18 | |--->|close |--->|close HTTP|----|--\
19 | | +-------------+ +----------------+ | | Another
20 | | +-----------------------------------+ | | Peer
21 | | | HTTPServer HTTP|<---|--/
22 | |--->|getHTTPFactory | +-------------
23 |check_freshness|<---| | +-------------
24 | get_resp|<---| HTTP|<---|HTTP Request
25 | | +-----------------------------------+ |
26 | | +---------------+ +--------------+ | Local Net
27 | | | CacheManager | | ProxyFile- | | (apt)
28 | |--->|scanDirectories| | Stream* | |
29 | |--->|save_file |--->|__init__ HTTP|--->|HTTP Response
30 | |--->|save_error | | | +-------------
31 | | | | | | +-------------
32 |new_cached_file|<---| | | file|--->|write file
33 | | +---------------+ +--------------+ |
34 | | +---------------+ +--------------+ | Filesystem
35 | | | MirrorManager | | AptPackages* | |
36 | |--->|updatedFile |--->|file_updated | |
37 | |--->|findHash |--->|findHash file|<---|read file
38 +---------------+ +---------------+ +--------------+ +-------------