refactor: add ctx to protocol Init
This commit is contained in:
parent
6061cffcfd
commit
43eb8c3e9a
|
@ -12,7 +12,7 @@ const GroupName = "protocols"
|
|||
|
||||
type Protocol interface {
|
||||
Name() string
|
||||
Init() error
|
||||
Init(ctx context.Context) error
|
||||
Start(ctx context.Context) error
|
||||
Stop(ctx context.Context) error
|
||||
Config() config.ProtocolConfig
|
||||
|
|
|
@ -166,10 +166,10 @@ func NewS5ProviderStore(params S5ProviderStoreParams) *S5ProviderStore {
|
|||
}
|
||||
}
|
||||
|
||||
func (s *S5Protocol) Init() error {
|
||||
func (s *S5Protocol) Init(ctx context.Context) error {
|
||||
s.node.Services().Storage().SetProviderStore(s.store)
|
||||
|
||||
err := s.node.Init()
|
||||
err := s.node.Init(ctx)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue