fsm

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2021 License: Apache-2.0, MIT Imports: 9 Imported by: 10

Documentation

Overview

Package fsm provides an abstraction on top of the fsm's defined by go-statemachine that allows you to make a group of finite state machines that tracks their own version and know how to migrate themselves to the target version

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMigratedFSM

func NewMigratedFSM(fsm fsm.Group, ms versioning.MigrationState) fsm.Group

NewMigratedFSM returns an fsm whose functions will fail until the migration state says its ready

func NewVersionedFSM

func NewVersionedFSM(ds datastore.Batching, parameters fsm.Parameters, migrations versioning.VersionedMigrationList, target versioning.VersionKey) (fsm.Group, func(context.Context) error, error)

NewVersionedFSM sets takes a datastore, fsm parameters, migrations list, and target version, and returns an fsm whose functions will fail till it's migrated to the target version and a function to run migrations

Types

This section is empty.

Jump to

Keyboard shortcuts

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