Skip to content

Conversation

hono0130
Copy link
Member

No description provided.

@hono0130 hono0130 force-pushed the feature/refactor-invariant-using-condition branch from 3b46dbd to a6521a1 Compare September 14, 2025 09:18
Signed-off-by: hono0130 <honoka.toda.vn@gmail.com>
@hono0130 hono0130 force-pushed the feature/refactor-invariant-using-condition branch from a6521a1 to 86d5d37 Compare September 14, 2025 09:19
- `NewMultiInvariant(check func(Machines) bool, sms ...AbstractStateMachine)` — reference multiple machines in one invariant
- `NewInvariant2` / `NewInvariant3` — convenience wrappers for 2 or 3 machines
- `NewMultiCondition(name string, check func(Machines) bool, sms ...AbstractStateMachine)` — reference multiple machines in one condition
- `NewCondition2` / `NewCondition3` — convenience wrappers for 2 or 3 machines

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- `NewCondition2` / `NewCondition3` — convenience wrappers for 2 or 3 machines
- `NewCondition2` / `NewCondition3` — convenience wrappers for two or three machines


```go
inv := goat.NewInvariant2(primary, replica, func(p *Storage, r *Storage) bool {
cond := goat.NewCondition2("replica", primary, replica, func(p *Storage, r *Storage) bool {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
cond := goat.NewCondition2("replica", primary, replica, func(p *Storage, r *Storage) bool {
cond := goat.NewCondition2("replication", primary, replica, func(p *Storage, r *Storage) bool {

@hono0130 hono0130 closed this Sep 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants