Versions in this module Expand all Collapse all v0 v0.9.0 Mar 25, 2020 Changes in this version + var DefaultBranchType = "bindings" + var DefaultControl = &Control + var DefaultInterpreters = InterpretersMap + var DefaultPatternParser = func(syntax string, p interface{}) (interface{}, error) + var EmittedMessagesInitialCap = 16 + var Exp_BranchTargetVariables = true + var Exp_PermanentBindings = true + var InterpreterNotFound = errors.New("interpreter not found") + var TooManyBindingss = errors.New("too many bindingss") + var TracesInitialCap = 16 + func Canonicalize(x interface{}) (interface{}, error) + func Gensym(n int) string + func IsBranchTargetVariable(s string) bool + func Timestamp() string + func Unquestion(p string) string + type Action interface + Binds func() []Bindings + Emits func() []interface{} + Exec func(context.Context, Bindings, StepProps) (*Execution, error) + type ActionSource struct + Binds []Bindings + Interpreter string + Source interface{} + func (a *ActionSource) Compile(ctx context.Context, interpreters Interpreters) (Action, error) + func (a *ActionSource) Copy() *ActionSource + type BadBranching struct + NodeName string + Spec *Spec + func (e *BadBranching) Error() string + type Branch struct + Guard Action + GuardSource *ActionSource + Pattern interface{} + Target string + func (b *Branch) Copy() *Branch + type Branches struct + Branches []*Branch + Modes []string + Type string + func (b *Branches) Copy() *Branches + type Breakpoint func(context.Context, *State) bool + type Context interface + Deadline func() (deadline time.Time, ok bool) + Done func() <-chan struct{} + Err func() error + Value func(key interface{}) interface{} + type Control struct + Breakpoints map[string]Breakpoint + Limit int + func (c *Control) Copy() *Control + type Events struct + Emitted []interface{} + Traces *Traces + func (es *Events) AddEmitted(x interface{}) + func (es *Events) AddEvents(more *Events) + func (es *Events) AddTrace(x interface{}) + type Execution struct + Bs Bindings + func NewExecution(bs Bindings) *Execution + type FuncAction struct + F func(context.Context, Bindings, StepProps) (*Execution, error) + func (a *FuncAction) Binds() []Bindings + func (a *FuncAction) Emits() []interface{} + func (a *FuncAction) Exec(ctx context.Context, bs Bindings, props StepProps) (*Execution, error) + type Interpreter interface + Compile func(ctx context.Context, code interface{}) (interface{}, error) + Exec func(ctx context.Context, bs Bindings, props StepProps, code interface{}, ...) (*Execution, error) + type Interpreters interface + Find func(interpreterName string) Interpreter + type InterpretersMap map[string]Interpreter + func NewInterpretersMap() InterpretersMap + func (m InterpretersMap) Find(name string) Interpreter + type Node struct + Action Action + ActionSource *ActionSource + Branches *Branches + Doc string + func (n *Node) Copy() *Node + func (n *Node) Terminal() bool + type ParamSpec struct + Advisory bool + Default interface{} + Doc string + IsArray bool + MaxCardinality int + MinCardinality int + Optional bool + Predicate interface{} + PrimitiveType string + SemanticType string + func (s *ParamSpec) Valid() error + func (s *ParamSpec) ValueCompilesWith(x interface{}) error + type Spec struct + ActionErrorBranches bool + ActionErrorNode string + Boot Action + BootSource *ActionSource + Doc string + ErrorNode string + Id string + Name string + NoAutoErrorNode bool + NoNewMachines bool + Nodes map[string]*Node + ParamSpecs map[string]ParamSpec + PatternParser func(string, interface{}) (interface{}, error) + PatternSyntax string + Toob Action + ToobSource *ActionSource + Uses []string + Version string + func TurnstileSpec(ctx context.Context) (*Spec, error) + func (s *Spec) Spec() *Spec + func (s *Spec) Step(ctx context.Context, st *State, pending interface{}, c *Control, ...) (*Stride, error) + func (s *Spec) Walk(ctx context.Context, st *State, pendings []interface{}, c *Control, ...) (*Walked, error) + func (spec *Spec) Compile(ctx context.Context, interpreters Interpreters, force bool) error + func (spec *Spec) Copy(version string) *Spec + func (spec *Spec) ParsePatterns(ctx context.Context) error + type SpecNotCompiled struct + Spec *Spec + func (e *SpecNotCompiled) Error() string + type Specter interface + Spec func() *Spec + type State struct + Bs Bindings + NodeName string + func (s *State) Copy() *State + func (s *State) String() string + type StepProps map[string]interface + func (ps StepProps) Copy() StepProps + type StopReason int + const BreakpointReached + const Done + const InternalError + const Limited + func (i StopReason) String() string + func (r *StopReason) UnmarshalJSON(data []byte) error + func (r StopReason) MarshalJSON() ([]byte, error) + type Stride struct + Consumed interface{} + From *State + To *State + func NewStride() *Stride + type Traces struct + Messages []interface{} + func NewTraces() *Traces + func (ts *Traces) Add(xs ...interface{}) + type UncompiledAction struct + NodeName string + Spec *Spec + func (e *UncompiledAction) Error() string + type UnknownNode struct + NodeName string + Spec *Spec + func (e *UnknownNode) Error() string + type UpdatableSpec struct + func NewUpdatableSpec(spec *Spec) *UpdatableSpec + func (s *UpdatableSpec) SetSpec(spec *Spec) error + func (s *UpdatableSpec) Spec() *Spec + type Walked struct + BreakpointId string + Error error + Remaining []interface{} + StoppedBecause StopReason + Strides []*Stride + func (w *Walked) From() *State + func (w *Walked) To() *State + func (w Walked) DoEmitted(f func(x interface{}) error) error Incompatible versions in this module v2.0.0+incompatible Apr 15, 2019