Documentation ¶
Overview ¶
*
- Copyright (c) Shipt. *
- This source code is licensed under the MIT license found in the
- LICENSE file in the root directory of this source tree.
Index ¶
Constants ¶
const AllowAllSideEffects = plinko.AllowBeforeTransition | plinko.AllowAfterTransition | plinko.AllowBetweenStates
AllowAllSideEffects is a convenience constant for registering a global
Variables ¶
This section is empty.
Functions ¶
func Dispatch ¶
func Dispatch(ctx context.Context, stateAction plinko.StateAction, sideEffects []SideEffectDefinition, payload plinko.Payload, transitionInfo plinko.TransitionInfo, elapsedMilliseconds int64) int
Dispatch is responsible for executing a set of declared side effect definitions when called upon.
Types ¶
type SideEffectDefinition ¶
type SideEffectDefinition struct { SideEffect plinko.SideEffect Filter plinko.SideEffectFilter }
SideEffectDefinition holds the callback and filtering characteristics describing when the sideeffect is signaled.
type TransitionDef ¶
TransitionDef is used to notify the registered function of a transition occurring
func (TransitionDef) GetDestination ¶
func (td TransitionDef) GetDestination() plinko.State
GetDestination returns the Destination State that's part of the process being executed.
func (TransitionDef) GetSource ¶
func (td TransitionDef) GetSource() plinko.State
GetSource returns the Source / Starting state
func (TransitionDef) GetTrigger ¶
func (td TransitionDef) GetTrigger() plinko.Trigger
GetTrigger returns the Trigger used to launch the transition
func (*TransitionDef) SetDestination ¶
func (td *TransitionDef) SetDestination(state plinko.State)
SetDestination ... sets the destination state, this method is only exposed when ModifiableTransitionInfo is referenced.