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 | | | Peer
11 | |--->|storeValue DHT|<---|--/
13 | | +-----------------------------------+ |
14 | | +-------------+ +----------------+ |
15 | | | PeerManager | | HTTPDownloader*| |
16 | |--->|get |--->|get HTTP|----|---> Mirror
17 | | | |--->|getRange | |
18 | |--->|close |--->|close HTTP|----|--\
19 | | +-------------+ +----------------+ | |
20 | | +-----------------------------------+ | | Another
21 | | | HTTPServer | | | Peer
22 | |--->|getHTTPFactory HTTP|<---|--/
23 |check_freshness|<---| | +-------------
24 | get_resp|<---| | +-------------
25 | /----|--->|setDirectories HTTP|<---|HTTP Request
26 | | | +-----------------------------------+ |
27 | | | +---------------+ +--------------+ | Local Net
28 | | | | CacheManager | | ProxyFile- | | (apt)
29 | | |--->|scanDirectories| | Stream* | |
30 | setDirectories|<---| |--->|__init__ HTTP|--->|HTTP Response
31 | |--->|save_file | | | +-------------
32 | |--->|save_error | | | +-------------
33 |new_cached_file|<---| | | file|--->|write file
34 | | +---------------+ +--------------+ |
35 | | +---------------+ +--------------+ | Filesystem
36 | | | MirrorManager | | AptPackages* | |
37 | |--->|updatedFile |--->|file_updated |--->|write file
38 | |--->|findHash |--->|findHash | |
39 +---------------+ +---------------+ +--------------+ +-------------