engine: event: Switch events system to use simpler structs

Pass around pointers of things now. Also, naming is vastly improved and
clearer.
This commit is contained in:
James Shubin
2019-01-12 14:27:36 -05:00
parent e20555d4bc
commit e2296a631b
5 changed files with 97 additions and 47 deletions

View File

@@ -100,11 +100,11 @@ type Init struct {
// Events returns a channel that we must watch for messages from the
// engine. When it closes, this is a signal to shutdown.
Events chan event.Kind
Events chan *event.Msg
// Read processes messages that come in from the Events channel. It is a
// helper method that knows how to handle the pause mechanism correctly.
Read func(event.Kind) error
Read func(*event.Msg) error
// Dirty marks the resource state as dirty. This signals to the engine
// that CheckApply will have some work to do in order to converge it.