@startuml Bitswap Components node "Top Level Interface" { [Bitswap] } node "Sending Blocks" { [Bitswap] --* [Engine] [Engine] -left-* [Ledger] [Engine] -right-* [PeerTaskQueue] [Engine] --> [TaskWorker (workers.go)] } node "Requesting Blocks" { [Bitswap] --* [WantManager] [WantManager] --> [BlockPresenceManager] [WantManager] --> [PeerManager] [PeerManager] --* [MessageQueue] } node "Providing" { [Bitswap] --* [Provide Collector (workers.go)] [Provide Collector (workers.go)] --* [Provide Worker (workers.go)] } node "Finding Providers" { [Bitswap] --* [ProvideQueryManager] } node "Sessions (smart requests)" { [Bitswap] --* [SessionManager] [SessionManager] --> [SessionInterestManager] [SessionManager] --o [Session] [Session] --* [sessionWantSender] [Session] --* [SessionPeerManager] [Session] --> [WantManager] [Session] --> [ProvideQueryManager] [Session] --* [sessionWants] [Session] --> [SessionInterestManager] [sessionWantSender] --> [BlockPresenceManager] [sessionWantSender] --> [PeerManager] } node "Network" { [BitSwapNetwork] [MessageQueue] --> [BitSwapNetwork] [ProvideQueryManager] --> [BitSwapNetwork] [TaskWorker (workers.go)] --> [BitSwapNetwork] [Provide Worker (workers.go)] --> [BitSwapNetwork] } @enduml