This declarative style is simpler to compose than the imperative wiring
up of objects.
+ pass context to StartOnlineServices as parameter. one by one, trying
to remove dependencies on node state so these initialization steps can
be broken down.
See the note:
// this file is only here to prevent go src tools (like godep) from
// thinking fuseversion is not a required package by non-darwin archs.
d3view is now in its own repo:
https://github.com/jbenet/ipfs-diag-net-d3-vis
This is so we can iterate on it quickly without having to
needlessly waste CI resources.
The repo also installs it for you:
```sh
git clone github.com/jbenet/ipfs-diag-net-d3-vis d3view
cd d3view
sudo make install
```
doh! I forgot to make sure leveldb is only opened once. thanks for catching this @mappum
* You may be wondering why we don't just share pointers to FSRepos. We
want to manage the lifecycle of the FSRepo by tracking its `state`.
Thus each FSRepo/goroutine requires private instance variables. For
this reason, each `fsrepo.At(p)` caller must get its own goroutine.
* There's a test in `fsrepo` because callers desire the ability to Open
from multiple goroutines. There's a test in `component` because this
is where the actual work needs to go in order to provide the desired
contract. If the `component` package moves, the assurances need to
move along with it.
cc @whyrusleeping @jbenet
side note: there are a couple packages in FSRepo that it might be
worthwhile to extract once the dust settles on this feature-set.
```Go
e := log.EventBegin(ctx, "provide")
e.Done()
e := log.EventBegin(ctx, "provide")
e.Close() // implements io.Closer in case you want to register with some lifecycle management system.
```
All the datastores used by pinners and so on should be mutex
wrapped. One issue with changing all of them from
ds.Datastore -> ds.ThreadSafeDatastore is that we wrap the
incoming ds.ThreadSafeDatastore with other datastores, which
do not implement the interface. Re-wrapping again causes
double locking. (which may be ok..., but...) any ideas?