state

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2018 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package state is a generated protocol buffer package.

It is generated from these files:

github.com/appcelerator/amp/pkg/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 (m *Machine) CreateState(id string, initial string) error

CreateState createstate

func (*Machine) DeleteState

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

DeleteState deleteState

func (*Machine) GetState

func (m *Machine) GetState(id string) (string, error)

GetState get state

func (*Machine) Is

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

Is is

func (*Machine) TransitionTo

func (m *Machine) TransitionTo(id string, to string) error

TransitionTo transitionTo

type RuleSet

type RuleSet map[string]map[string]bool

RuleSet describe allowed state transitions

type State

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

func (*State) Descriptor

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

func (*State) GetValue

func (m *State) GetValue() string

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