X-Git-Url: https://git.mxchange.org/?p=quix0rs-apt-p2p.git;a=blobdiff_plain;f=apt_dht%2F__init__.py;h=b945cecc62c30ca08dbcd6d0d80ee973236e9dcd;hp=e69de29bb2d1d6434b8b29ae775ad8c2e48c5391;hb=b36fa9c7f5ad4827c8de990fbfca1a379bb60e39;hpb=1411f543eeafe083bed32f8d278a714f6bbb5391 diff --git a/apt_dht/__init__.py b/apt_dht/__init__.py index e69de29..b945cec 100644 --- a/apt_dht/__init__.py +++ b/apt_dht/__init__.py @@ -0,0 +1,47 @@ + +"""The main apt-dht modules. + +To run apt-dht, you probably want to do something like:: + + from apt_dht.apt_dht import AptDHT + myapp = AptDHT(myDHT) + +where myDHT is a DHT that implements interfaces.IDHT. + +Diagram of the interaction between the given modules:: + + +---------------+ +-----------------------------------+ +------------- + | AptDHT | | DHT | | Internet + | |--->|join DHT|----|--\ + | |--->|loadConfig | | | Another + | |--->|getValue | | | Node + | |--->|storeValue DHT|<---|--/ + | |--->|leave | | + | | +-----------------------------------+ | + | | +-------------+ +----------------+ | + | | | PeerManager | | HTTPDownloader*| | + | |--->|get |--->|get HTTP|----|---> Mirror + | | | |--->|getRange | | + | |--->|close |--->|close HTTP|----|--\ + | | +-------------+ +----------------+ | | Another + | | +-----------------------------------+ | | Peer + | | | HTTPServer HTTP|<---|--/ + | |--->|getHTTPFactory | +------------- + |check_freshness|<---| | +------------- + | get_resp|<---| HTTP|<---|HTTP Request + | | +-----------------------------------+ | + | | +---------------+ +--------------+ | Local Net + | | | CacheManager | | ProxyFile- | | (apt) + | |--->|scanDirectories| | Stream* | | + | |--->|save_file |--->|__init__ HTTP|--->|HTTP Response + | |--->|save_error | | | +------------- + | | | | | | +------------- + |new_cached_file|<---| | | file|--->|write file + | | +---------------+ +--------------+ | + | | +---------------+ +--------------+ | Filesystem + | | | MirrorManager | | AptPackages* | | + | |--->|updatedFile |--->|file_updated | | + | |--->|findHash |--->|findHash file|<---|read file + +---------------+ +---------------+ +--------------+ +------------- + +"""