state

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2016 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package state is a generated protocol buffer package.

It is generated from these files:

github.com/appcelerator/amp/api/state/state.proto

It has these top-level messages:

State

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Machine

type Machine struct {
	// contains filtered or unexported fields
}

Machine StateMachine is the state machine

func NewMachine

func NewMachine(ruleSet RuleSet, store storage.Interface) Machine

NewMachine return a new state machine

func (*Machine) CreateState

func (s *Machine) CreateState(id string, initial int32) error

CreateState createstate

func (*Machine) DeleteState

func (s *Machine) DeleteState(id string) error

DeleteState deleteState

func (*Machine) GetState

func (s *Machine) GetState(id string) (int32, error)

GetState get state

func (*Machine) Is

func (s *Machine) Is(id string, expected int32) (bool, error)

Is is

func (*Machine) TransitionTo

func (s *Machine) TransitionTo(id string, to int32) error

TransitionTo transitionTo

type RuleSet

type RuleSet [][]bool

RuleSet describe allowed state transitions

type State

type State struct {
	Value int32 `protobuf:"varint,1,opt,name=value" json:"value,omitempty"`
}

func (*State) Descriptor

func (*State) Descriptor() ([]byte, []int)

func (*State) ProtoMessage

func (*State) ProtoMessage()

func (*State) Reset

func (m *State) Reset()

func (*State) String

func (m *State) String() string

Jump to

Keyboard shortcuts

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