Wilfred Spiegelenburg created YUNIKORN-186:
----------------------------------------------

             Summary: clean up events in k8shim
                 Key: YUNIKORN-186
                 URL: https://issues.apache.org/jira/browse/YUNIKORN-186
             Project: Apache YuniKorn
          Issue Type: Improvement
          Components: shim - kubernetes
            Reporter: Wilfred Spiegelenburg


The events in the shim use a complex structure with functions declared. However 
one of the functions is hardcoded to always return nil, one is used to pass a 
the ID of the object it is called on around which we can also get in the 
handler and the last one is to get the wrapped event. The event can be 
simplified a lot.
The state machine and events are declared in separate files. They should be 
moved into one file to show the dependency between the two and make sure they 
are aligned.
States are maintained disconnected from the state machine and events. State, 
events and the state machine should all be in the same location

We can simplify this structure similar to what we use in the core:
- no large object passed around
- make the event type an int, implement using an iota
- implement a string() function on the state and type
- split the state type into a state per object and not one global list





--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to