// 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
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
// 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
func NewVersionedFSM(ds datastore.Batching, parameters fsm.Parameters, migrations versioning.VersionedMigrationList, target versioning.VersionKey) (fsm.Group, func(context.Context) error, error) {
	r := runner.NewRunner(ds, migrations, target, migrate.To)
	fsm, err := fsm.New(namespace.Wrap(ds, datastore.NewKey(string(target))), parameters)
	if err != nil {
		return nil, nil, err
	}
	return NewMigratedFSM(fsm, r), r.Migrate, nil
}
func NewVersionedFSM ( ds datastore . Batching , parameters fsm . Parameters , migrations versioning . VersionedMigrationList , target versioning . VersionKey ) ( fsm . Group , func ( context . Context ) error , error ) { r := runner . NewRunner ( ds , migrations , target , migrate . To ) fsm , err := fsm . New ( namespace . Wrap ( ds , datastore . NewKey ( string ( target ) ) ) , parameters ) if err != nil { return nil , nil , err } return NewMigratedFSM ( fsm , r ) , r . Migrate , nil }
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
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