rename to better convey intent + document
This commit is contained in:
parent
ee9d9a52a9
commit
bea9cd2fe2
@ -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),
|
||||
|
||||
|
@ -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),
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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 {
|
||||
|
@ -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{}
|
||||
|
Loading…
Reference in New Issue
Block a user