sideeffects

package
v0.8.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 23, 2023 License: MIT Imports: 2 Imported by: 0

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

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

type TransitionDef struct {
	Source      plinko.State
	Destination plinko.State
	Trigger     plinko.Trigger
}

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL