samisagit / natskell

A NATS client library written in Haskell
MIT License
5 stars 0 forks source link

Implement a state machine #113

Open samisagit opened 1 year ago

samisagit commented 1 year ago

We're in the situation now where the NATS client connection can be in many states e.g. preconnection, fatal error, invalid message in buffer etc. Using a state machine could reduce the complexity of handle states going forward.

samisagit commented 1 year ago

States:

Possible we need a top level state machine and a buffer state machine 🤔