refactor: split SetServices into its own interface

This commit is contained in:
Derrick Hammer 2024-01-30 16:06:57 -05:00
parent 5a2e28faba
commit fd55c0984f
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 5 additions and 1 deletions

View File

@ -6,14 +6,18 @@ import (
"go.uber.org/zap" "go.uber.org/zap"
) )
type ServicesSetter interface {
SetServices(services Services)
}
type Service interface { type Service interface {
Start() error Start() error
Stop() error Stop() error
Init() error Init() error
SetServices(services Services)
Logger() *zap.Logger Logger() *zap.Logger
Config() *config.NodeConfig Config() *config.NodeConfig
Db() *bbolt.DB Db() *bbolt.DB
ServicesSetter
} }
type Services interface { type Services interface {
P2P() P2PService P2P() P2PService