Documentation ¶
Overview ¶
This program is a simplistic example of using Boutique as a state store. This is not a practical example, it just shows how Boutique works.
This example spins up 1000 goroutines that sleep for 1-5 seconds. Our state store simply needs to track how many goroutines are running at a given time and print that number out as the store is updated.
Boutique allows us to subscribe to state changes and we only receive the latest update, not all updates. This again is not a practical example, because we only have 1 subscriber to our changes. This would be easier to accomplish normally with atomic.Value for this counter.
Click to show internal directories.
Click to hide internal directories.