-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ref T24.
- Loading branch information
Showing
72 changed files
with
16,343 additions
and
2,352 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
syntax: glob | ||
*~ | ||
*.capnp.go | ||
*.log | ||
*.test | ||
*.swp | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
CAPNP := $(patsubst %.capnp,%.capnp.go,$(filter-out go.capnp,$(wildcard *.capnp))) | ||
CAPNPGO := $(wildcard *.capnp.go) | ||
|
||
all: capnp | ||
|
||
capnp: $(CAPNP) | ||
|
||
clean: | ||
rm -f $(CAPNPGO) | ||
|
||
%.capnp.go: %.capnp | ||
capnp compile -o go $< | ||
|
||
.PHONY: all capnp clean |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
using Go = import "../../common/capnp/go.capnp"; | ||
|
||
$Go.package("capnp"); | ||
$Go.import("goshawkdb.io/server/capnp"); | ||
|
||
@0xefa5a1e88b6da9e3; | ||
|
||
using Ballot = import "ballot.capnp"; | ||
using Txn = import "transaction.capnp"; | ||
using Outcome = import "outcome.capnp"; | ||
|
||
struct AcceptorState { | ||
txn @0: Txn.Txn; | ||
outcome @1: Outcome.Outcome; | ||
sendToAll @2: Bool; | ||
instances @3: List(InstancesForVar); | ||
} | ||
|
||
struct InstancesForVar { | ||
varId @0: Data; | ||
instances @1: List(AcceptedInstance); | ||
result @2: Ballot.Ballot; | ||
} | ||
|
||
struct AcceptedInstance { | ||
rmId @0: UInt32; | ||
roundNumber @1: UInt64; | ||
ballot @2: Ballot.Ballot; | ||
} |
Oops, something went wrong.