go-bitswap.puml 1.27 KB
Newer Older
1 2 3 4 5
@startuml Bitswap Components

node "Top Level Interface" {
  [Bitswap]
}
6 7 8

node "Sending Blocks" {  
  [Bitswap] --* [Engine]
9 10 11 12
  [Engine] -left-* [Ledger]
  [Engine] -right-* [PeerTaskQueue]
  [Engine] --> [TaskWorker (workers.go)]
}
13

14 15
node "Requesting Blocks" {
  [Bitswap] --* [WantManager]
16
  [WantManager] --> [BlockPresenceManager]
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
  [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]
32
  [SessionManager] --> [SessionInterestManager]
33
  [SessionManager] --o [Session]
34
  [Session] --* [sessionWantSender]
35 36
  [Session] --* [SessionPeerManager]
  [Session] --> [WantManager]
37 38 39 40 41
  [Session] --> [ProvideQueryManager]
  [Session] --* [sessionWants]
  [Session] --> [SessionInterestManager]
  [sessionWantSender] --> [BlockPresenceManager]
  [sessionWantSender] --> [PeerManager]
42 43 44 45 46 47 48 49 50 51
}

node "Network" {
  [BitSwapNetwork]
  [MessageQueue] --> [BitSwapNetwork]
  [ProvideQueryManager] --> [BitSwapNetwork]
  [TaskWorker (workers.go)] --> [BitSwapNetwork]
  [Provide Worker (workers.go)] --> [BitSwapNetwork]
}
@enduml