Merge remote-tracking branch 'origin/master' into next

Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
This commit is contained in:
Jakub Sztandera
2020-06-05 00:33:43 +02:00
15 changed files with 278 additions and 60 deletions
+10 -4
View File
@@ -27,10 +27,11 @@ import (
type CommonAPI struct {
fx.In
APISecret *dtypes.APIAlg
Host host.Host
Router lp2p.BaseIpfsRouting
Sk *dtypes.ScoreKeeper
APISecret *dtypes.APIAlg
Host host.Host
Router lp2p.BaseIpfsRouting
Sk *dtypes.ScoreKeeper
ShutdownChan dtypes.ShutdownChan
}
type jwtPayload struct {
@@ -133,4 +134,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.ShutdownChan <- struct{}{}
return nil
}
var _ api.Common = &CommonAPI{}