phonestates

command module
v0.0.0-...-1b66000 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2021 License: MIT Imports: 8 Imported by: 0

README

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

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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