first take at "daemon stop" command
Fixes #1827 TODO: plumb the daemon-stopping into lotus-storage-miner, too
This commit is contained in:
@@ -25,9 +25,10 @@ import (
|
||||
type CommonAPI struct {
|
||||
fx.In
|
||||
|
||||
APISecret *dtypes.APIAlg
|
||||
Host host.Host
|
||||
Router lp2p.BaseIpfsRouting
|
||||
APISecret *dtypes.APIAlg
|
||||
Host host.Host
|
||||
Router lp2p.BaseIpfsRouting
|
||||
ShutdownCh dtypes.ShutdownCh
|
||||
}
|
||||
|
||||
type jwtPayload struct {
|
||||
@@ -115,4 +116,9 @@ func (a *CommonAPI) LogSetLevel(ctx context.Context, subsystem, level string) er
|
||||
return logging.SetLogLevel(subsystem, level)
|
||||
}
|
||||
|
||||
func (a *CommonAPI) Shutdown(ctx context.Context) error {
|
||||
a.ShutdownCh <- struct{}{}
|
||||
return nil
|
||||
}
|
||||
|
||||
var _ api.Common = &CommonAPI{}
|
||||
|
||||
Reference in New Issue
Block a user