refactor: split SetServices into its own interface
This commit is contained in:
parent
5a2e28faba
commit
fd55c0984f
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue