GODT-1932: frontend is instantiated before bridge.

WIP: introduced frontend.Type.
WIP: frontend is create before bridge is instantiated.
WIP: filtering of internet stastus event in gRPC event queue.
This commit is contained in:
Xavier Michelon
2022-10-10 17:32:08 +02:00
parent 9a3900114b
commit db2379e2fd
7 changed files with 140 additions and 61 deletions

View File

@ -47,7 +47,6 @@ func New( //nolint:funlen
eventListener listener.Listener,
updater types.Updater,
bridge types.Bridger,
restarter types.Restarter,
) *frontendCLI { //nolint:revive
fe := &frontendCLI{
@ -55,7 +54,6 @@ func New( //nolint:funlen
eventListener: eventListener,
updater: updater,
bridge: bridge,
restarter: restarter,
}
@ -319,7 +317,8 @@ func (f *frontendCLI) watchEvents() {
}
// Loop starts the frontend loop with an interactive shell.
func (f *frontendCLI) Loop() error {
func (f *frontendCLI) Loop(b types.Bridger) error {
f.bridge = b
f.Printf(`
Welcome to %s interactive shell
___....___