fsm

package
v0.1.34 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EvolveDecision added in v0.1.33

func EvolveDecision[K comparable, T any, S ~func(ctx context.Context, args T) (T, S, error), D ~map[K]S](s D, ctx context.Context, start K, args T) (o T, err error)

EvolveDecision process strategies from start with args. returns os.ErrNotExist if the start state not exists

func EvolveFn added in v0.1.33

func EvolveFn[T any, S ~func(ctx context.Context, args T) (T, S, error)](ctx context.Context, args T, current S) (o T, err error)

Types

type Decider added in v0.1.32

type Decider[K comparable, T any, S ~func(ctx context.Context, args T) (T, S, error)] map[K]S

type Decision added in v0.1.32

type Decision[K comparable, T any, S ~func(ctx context.Context, args T) (T, S, error)] func(ctx context.Context, args T) (T, S, error)

type StateFn

type StateFn[T any, S ~func(ctx context.Context, args T) (T, S, error)] func(ctx context.Context, args T) (T, S, error)

Jump to

Keyboard shortcuts

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