diff --git a/cmd/portal/portal.go b/cmd/portal/portal.go index 8c66948..76d5859 100644 --- a/cmd/portal/portal.go +++ b/cmd/portal/portal.go @@ -104,7 +104,7 @@ func (p *PortalImpl) getInitFuncs() []func() error { }, func() error { for _, _func := range p.protocolRegistry.All() { - err := _func.Initialize(p.Config(), p.Logger()) + err := _func.Initialize(p) if err != nil { return err } diff --git a/interfaces/protocol.go b/interfaces/protocol.go index 9d10e6d..7af19d0 100644 --- a/interfaces/protocol.go +++ b/interfaces/protocol.go @@ -1,11 +1,6 @@ package interfaces -import ( - "github.com/spf13/viper" - "go.uber.org/zap" -) - type Protocol interface { - Initialize(config *viper.Viper, logger *zap.Logger) error + Initialize(portal Portal) error Start() error }