Commit 98aa8f93 authored by hannahhoward's avatar hannahhoward

docs(diagram): update architecture diagram

Update to the latest architecture, remove private vars

fix #5
parent cc4d4438
...@@ -20,8 +20,6 @@ package "go-ipld-prime" { ...@@ -20,8 +20,6 @@ package "go-ipld-prime" {
interface AdvVisitFn { interface AdvVisitFn {
} }
class TraversalConfig { class TraversalConfig {
ctx context.Context
linkLoader LinkLoader
} }
class TraversalProgress { class TraversalProgress {
TraverseInformatively(Node, Selector, AdvVisitFn) TraverseInformatively(Node, Selector, AdvVisitFn)
...@@ -54,13 +52,7 @@ package "go-ipld-prime" { ...@@ -54,13 +52,7 @@ package "go-ipld-prime" {
package "go-graphsync" { package "go-graphsync" {
class GraphSync { class GraphSync {
network : GraphySyncNetwork Request(ctx context.Context, p peer.ID, cidRootedSelector Node) (chan ResponseProgress, chan ResponseError)
requestManager : RequestManager
responseManager: ResponseManager
ipldBridge: IPLDBridge
rawLoader: RawLoader
Request(ctx context.Context, p peer.ID, cidRootedSelector Node) chan Block
ReceiveMessage(ctx context.Context, sender peer.ID, incoming GraphSyncMessage) ReceiveMessage(ctx context.Context, sender peer.ID, incoming GraphSyncMessage)
ReceiveError(error) ReceiveError(error)
} }
...@@ -100,24 +92,55 @@ package "go-graphsync" { ...@@ -100,24 +92,55 @@ package "go-graphsync" {
goGraphSyncNetworkPF .. libP2PGraphSyncNetwork goGraphSyncNetworkPF .. libP2PGraphSyncNetwork
} }
package messagequeue {
class MessageQueue {
AddRequest(GraphSyncRequestID, selector []byte, GraphSyncPriority)
Cancel(GraphSyncRequestID)
Startup()
Shutdown()
}
object "PackagePublicFunctions" as goMessageQueuePF {
New(context.Context, peer.ID, GraphSyncNetwork) *MessageQueue
}
GraphSync .. goMessageQueuePF
MessageQueue *-- GraphSyncNetwork
}
package peerhandler {
class PeerManager {
Connected(p peer.ID)
Disconnected(p peer.ID)
ConnectedPeers() []peer.ID
SendRequest(peer.ID, GraphSyncRequestID, selector []byte, priority)
CancelRequest(peer.ID, GraphSyncRequestID)
}
object "Package Public Functions" as goPeerManagerPF {
New(ctx context.Context, createPeerQueue func(context, peer.ID) MessageQueue)
}
GraphSync .. goPeerManagerPF
PeerManager *-- MessageQueue
}
package requestmanager { package requestmanager {
class RequestManager { interface ResponseProgress {
network : GraphSyncNetwork
ipldBridge: GraphSyncNetwork }
interface ResponseError {
}
class RequestManager {
SetDelegate(peerHandler PeerManager)
SendRequest(ctx context.Context, p peer.ID, cidRootedSelector Node) chan Block SendRequest(ctx context.Context, p peer.ID, cidRootedSelector Node) chan Block
ProcessResponses(responses []GraphSyncResponse) ProcessResponses(message GraphSyncMessage)
} }
RequestManager *-- GraphSyncNetwork RequestManager *-- PeerManager
GraphSync *-- RequestManager GraphSync *-- RequestManager
} }
package responsemanager { package responsemanager {
class ResponseManager { class ResponseManager {
network : GraphySyncNetwork
ipldBridge: IPLDBridge
rawLoader: RawLoader
ProcessRequests(p peer.ID, requests []GraphSyncRequests) ProcessRequests(p peer.ID, requests []GraphSyncRequests)
} }
ResponseManager *-- GraphSyncNetwork ResponseManager *-- GraphSyncNetwork
...@@ -176,8 +199,6 @@ package "go-graphsync" { ...@@ -176,8 +199,6 @@ package "go-graphsync" {
ResponseManager *-- IPLDBridge ResponseManager *-- IPLDBridge
class ipldBridge { class ipldBridge {
nodeBuilderChooser: NodeBuilderChooser
multicodecTable: MulticodecDecodeTable
} }
object "PackagePublicFunctions" as goIPLDBridge { object "PackagePublicFunctions" as goIPLDBridge {
...@@ -195,16 +216,10 @@ package "go-graphsync" { ...@@ -195,16 +216,10 @@ package "go-graphsync" {
object "PackagePublicFunctions" as goGraphsyncPf { object "PackagePublicFunctions" as goGraphsyncPf {
New(ctx context.Context, network GraphSyncNetwork, rawLoader RawLoader, multicodecDecodeTable MulticodecDecodeTable, nodeBuilderChooser NodeBuilderChooser) GraphSync New(ctx context.Context, network GraphSyncNetwork, rawLoader RawLoader, multicodecDecodeTable MulticodecDecodeTable, nodeBuilderChooser NodeBuilderChooser) GraphSync
} }
} }
package "go-filecoin" { package "go-filecoin" {
class "go-filecoin" { class "go-filecoin" {
graphSync : GraphSync
host: libp2pHost.Host
nodeBuilderChooser: NodeBuilderChooser
multicodecTable: MulticodecDecodeTable
rawLoader: RawLoader
} }
"go-filecoin" *-- GraphSync "go-filecoin" *-- GraphSync
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment