Documentation ¶
Index ¶
- func EvolveDecision[K comparable, T any, S ~func(ctx context.Context, args T) (T, S, error), ...](s D, ctx context.Context, start K, args T) (o T, err error)
- 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)
- type Decider
- type Decision
- type StateFn
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
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
Click to show internal directories.
Click to hide internal directories.