Skip to content

A demo of using stateless, an implementation of state machine in Go which uses an external storage

License

Notifications You must be signed in to change notification settings

stevenferrer/phonestates

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Phone states

phone states

This project demonstrates the use of stateless, an implementation of state machines in Go.

This is a modified version of the original example which uses an external storage for storing the states.

type LogRepository struct {
    ...
    phoneLogs map[PhoneID][]Log
}

This is a very simple in-memory store. But in reality, this external storage can be a real database (e.g. Postgres, MariaDB, etc.)

Running

To run the example just run the command below: $ go build -v -o phonestates && ./phonestates

About

A demo of using stateless, an implementation of state machine in Go which uses an external storage

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Languages