@cryptotaxi247 / kubo / commits / b039ebceb

core: arrangement change in struct

Juan Batiz-Benet committed Dec 16, 2014 at 05:58 UTC b039ebceb674d586faf29b0caee3c2b83f0a4c73
1 file changed +20 -43
core/core.go
+20 -43
@@ -42,51 +42,28 @@ var log = eventlog.Logger("core")
42 // IpfsNode is IPFS Core module. It represents an IPFS instance.
43 type IpfsNode struct {
44
45 - // the node's configuration
46 - Config *config.Config
47 -
48 - // the local node's identity
49 - Identity peer.Peer
50 -
51 - // storage for other Peer instances
52 - Peerstore peer.Peerstore
53 -
54 - // the local datastore
55 - Datastore ds2.ThreadSafeDatastoreCloser
56 -
57 - // the network message stream
58 - Network inet.Network
59 -
60 - // the routing system. recommend ipfs-dht
61 - Routing routing.IpfsRouting
62 -
63 - // the block exchange + strategy (bitswap)
64 - Exchange exchange.Interface
65 -
66 - // the block service, get/add blocks.
67 - Blocks *bserv.BlockService
68 -
69 - // the merkle dag service, get/add objects.
70 - DAG merkledag.DAGService
71 -
72 - // the path resolution system
73 - Resolver *path.Resolver
74 -
75 - // the name system, resolves paths to hashes
76 - Namesys namesys.NameSystem
77 -
78 - // the diagnostics service
79 - Diagnostics *diag.Diagnostics
80 -
81 - // the pinning manager
82 - Pinning pin.Pinner
83 -
84 - // current mount state, if any.
85 - Mounts Mounts
45 + // Self
46 + Config *config.Config // the node's configuration
47 + Identity peer.Peer // the local node's identity
48 + onlineMode bool // alternatively, offline
49 +
50 + // Local node
51 + Datastore ds2.ThreadSafeDatastoreCloser // the local datastore
52 + Pinning pin.Pinner // the pinning manager
53 + Mounts Mounts // current mount state, if any.
54 +
55 + // Services
56 + Peerstore peer.Peerstore // storage for other Peer instances
57 + Network inet.Network // the network message stream
58 + Routing routing.IpfsRouting // the routing system. recommend ipfs-dht
59 + Exchange exchange.Interface // the block exchange + strategy (bitswap)
60 + Blocks *bserv.BlockService // the block service, get/add blocks.
61 + DAG merkledag.DAGService // the merkle dag service, get/add objects.
62 + Resolver *path.Resolver // the path resolution system
63 + Namesys namesys.NameSystem // the name system, resolves paths to hashes
64 + Diagnostics *diag.Diagnostics // the diagnostics service
65
66 ctxc.ContextCloser
88 -
89 - onlineMode bool // alternatively, offline
67 }
68
69 // Mounts defines what the node's mount state is. This should