rename to better convey intent + document

This commit is contained in:
laser 2020-06-02 12:35:11 -07:00
parent ee9d9a52a9
commit bea9cd2fe2
5 changed files with 7 additions and 5 deletions

View File

@ -105,7 +105,7 @@ var runCmd = &cli.Command{
var minerapi api.StorageMiner
stop, err := node.New(ctx,
node.StorageMiner(&minerapi),
node.Override(new(dtypes.ShutdownCh), shutdownChan),
node.Override(new(dtypes.ShutdownChan), shutdownChan),
node.Online(),
node.Repo(r),

View File

@ -199,7 +199,7 @@ var DaemonCmd = &cli.Command{
node.FullAPI(&api),
node.Override(new(dtypes.Bootstrapper), isBootstrapper),
node.Override(new(dtypes.ShutdownCh), shutdownChan),
node.Override(new(dtypes.ShutdownChan), shutdownChan),
node.Online(),
node.Repo(r),

View File

@ -150,7 +150,7 @@ func defaults() []Option {
Override(new(helpers.MetricsCtx), context.Background),
Override(new(record.Validator), modules.RecordValidator),
Override(new(dtypes.Bootstrapper), dtypes.Bootstrapper(false)),
Override(new(dtypes.ShutdownCh), make(chan struct{})),
Override(new(dtypes.ShutdownChan), make(chan struct{})),
// Filecoin modules

View File

@ -28,7 +28,7 @@ type CommonAPI struct {
APISecret *dtypes.APIAlg
Host host.Host
Router lp2p.BaseIpfsRouting
ShutdownCh dtypes.ShutdownCh
ShutdownCh dtypes.ShutdownChan
}
type jwtPayload struct {

View File

@ -1,3 +1,5 @@
package dtypes
type ShutdownCh chan struct{}
// ShutdownChan is a channel to which you send a value if you intend to shut
// down the daemon (or storage miner), including the node and RPC server.
type ShutdownChan chan struct{}