machine

package
v1.14.2 Latest Latest
Warning

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

Go to latest
Published: May 20, 2023 License: MIT Imports: 0 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Machine

type Machine[C, S any] struct {
	// contains filtered or unexported fields
}

func NewSimpleMachine

func NewSimpleMachine[C, S any](f func(C, S) (S, error)) *Machine[C, S]

func NewSimpleMachineWithState

func NewSimpleMachineWithState[C, S any](f func(C, S) (S, error), state S) *Machine[C, S]

func (*Machine[C, S]) Handle

func (o *Machine[C, S]) Handle(cmd C) error

func (*Machine[C, S]) State

func (o *Machine[C, S]) State() S

Jump to

Keyboard shortcuts

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