Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Runtime ¶
type Runtime interface { //NextState by calling NextState, State Machine goes to another state. //one thing to remember, once you call this method, you are no longer //in that state. Make sure that you are nor doing anything right after this //call. //Passing nil to State tells the Runtime that this is the end of state machine. NextState(context.Context, State) //return the current context of Runtime. Context() context.Context //Fork run each state as initial state of unique Runtime. //I does not block, if you want to block until all of them are done, //pass the array of runtime to Join function. Fork(context.Context, ...State) []Runtime }
Runtime is base blocking start point.
Click to show internal directories.
Click to hide internal directories.