refactor: add ctx to protocol Init

This commit is contained in:
Derrick Hammer 2024-02-27 03:35:43 -05:00
parent 6061cffcfd
commit 43eb8c3e9a
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
2 changed files with 3 additions and 3 deletions

View File

@ -12,7 +12,7 @@ const GroupName = "protocols"
type Protocol interface { type Protocol interface {
Name() string Name() string
Init() error Init(ctx context.Context) error
Start(ctx context.Context) error Start(ctx context.Context) error
Stop(ctx context.Context) error Stop(ctx context.Context) error
Config() config.ProtocolConfig Config() config.ProtocolConfig

View File

@ -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) s.node.Services().Storage().SetProviderStore(s.store)
err := s.node.Init() err := s.node.Init(ctx)
if err != nil { if err != nil {
return err return err
} }