Warning: during normal execution node teardown must be the
last thing that happens because command requests return
io.Readers, which may still be constructing or processing
their output. The node (and its subservices) is needed for
this. good night and good luck.
@jbenet
now, ipfs can be built and executed in one step:
```
docker run jbenet/go-ipfs daemon --initialized
```
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
@jbenet @whyrusleeping @mappum
very helpful for tracking down errors. the stack traces are only
shown when debug mode is visible. They function best when caught at the
source.
I propose we use this errors package as a drop-in replacement for
fmt.Errorf and errors.New in all of our code, and use errors.Wrap for
external errors as they emerge from others' libraries.
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
Signed-off-by: Brian Tiger Chow <brian.holderchow@gmail.com>
@jbenet this commit re-introduces the peer identity line. It's very
useful. I understand it may have been removed because of the clashing of
the IDs. To alleviate this, this commit places some negative space
between the two lines.
'to test' -> 'to get started' as a stronger call to action
```
λ. ipfs2 init -f
initializing ipfs node at /Users/btc/.go-ipfs
generating key pair...done.
peer identity: QmWzjxNEYKjDAxuHJqvtLP1dZTDjreBSUsArWoHai1v9yP
to get started, enter: ipfs cat QmYpv2VEsxzTTXRYX3PjDg961cnJE3kY1YDXLycHGQ3zZB
```
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
TODO use a writer to get the command output
resulting appearance:
```
go-ipfs (feat/machine-readable-logging) λ. make install_2; ipfs2 init -f
cd cmd/ipfs2 && go install
initializing ipfs node at /Users/btc/.go-ipfs
generating key pair...
peer identity: %s QmcPLgrqfvnneJ3vr3oGpkTiS9Psx8p3HxevjnoZYToDRm
```
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
TODO allow user dir override
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
# TYPES
# feat
# fix
# docs
# style (formatting, missing semi colons, etc; no code change):
# refactor
# test (adding missing tests, refactoring tests; no production code change)
# chore (updating grunt tasks etc; no production code change)
Signed-off-by: Brian Tiger Chow <brian.holderchow@gmail.com>
This commit changes the signal handler to be added once
the command is executing. this is because the daemon
has its own signal handler, that must try to shut down
the node gracefully first. You know, just in case.
This commit adds a Mount abstraction (which is really just
a wrapped context closer). It makes sure to bind the mount
to the fate of the Node (i.e. close it if the node ends).
This fixes#350
@jbenet @mappum
Yeah, there's some duplicated work. But there's also a separation of
concerns. In one case, we check to determine where the command should
run. In the other case, we check to determine which hooks should run.
Having these actions separated reduces complexity in a nice way.
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
impl errorf
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
return a debug error
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>