Skip to content

Commit

Permalink
use new component model definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
faec committed Jul 24, 2023
1 parent cdc852f commit 71346c5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions pkg/component/runtime/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,8 @@ type Manager struct {
}

type updateRequest struct {
components []component.Component
tearDown bool
componentModel component.Model
tearDown bool
}

// NewManager creates a new manager.
Expand Down Expand Up @@ -242,7 +242,7 @@ func (m *Manager) Run(ctx context.Context) error {
case req := <-m.updateChan:
// Begin the update, and point updateErrChan at our error reporting
// channel so we can notify Coordinator of the result.
updateErr = m.update(req.components, req.tearDown)
updateErr = m.update(req.componentModel, req.tearDown)
updateErrChan = m.errorChan
case updateErrChan <- updateErr:
// We sent the most recent update result, clear the channel until the
Expand Down Expand Up @@ -280,7 +280,7 @@ func (m *Manager) Update(model component.Model) error {
}
// teardown is true because the public `Update` method would be coming directly from
// policy so if a component was removed it needs to be torn down.
m.updateChan <- updateRequest{components, true}
m.updateChan <- updateRequest{model, true}
return nil
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/component/runtime/manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2599,7 +2599,7 @@ func TestManager_FakeShipper(t *testing.T) {
subErrCh <- err
} else {
// successful; turn it all off
err := m.Update([]component.Component{})
err := m.Update(component.Model{})
if err != nil {
subErrCh <- err
}
Expand Down

0 comments on commit 71346c5

Please sign in to comment.