generated from dogmatiq/template-go
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update to persistencekit v0.8.0, remove internal journal/kv protobuf …
…utilities.
- Loading branch information
Showing
29 changed files
with
130 additions
and
571 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
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,20 @@ | ||
package cluster | ||
|
||
import ( | ||
"github.com/dogmatiq/enginekit/protobuf/uuidpb" | ||
"github.com/dogmatiq/persistencekit/kv" | ||
"github.com/dogmatiq/persistencekit/marshaler" | ||
"github.com/dogmatiq/veracity/internal/cluster/internal/registrypb" | ||
) | ||
|
||
// newKVStore returns a new [kv.Store] that uses s for its underlying storage. | ||
func newKVStore(s kv.BinaryStore) kv.Store[*uuidpb.UUID, *registrypb.Registration] { | ||
return kv.NewMarshalingStore( | ||
s, | ||
marshaler.NewProto[*uuidpb.UUID](), | ||
marshaler.NewProto[*registrypb.Registration](), | ||
) | ||
} | ||
|
||
// registryKeyspace is the name of the keyspace that contains registry data. | ||
const registryKeyspace = "cluster.registry" |
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
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
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,6 @@ | ||
package eventstream | ||
|
||
var ( | ||
JournalName = journalName | ||
NewJournalStore = newJournalStore | ||
) |
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
This file was deleted.
Oops, something went wrong.
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,17 @@ | ||
package integration | ||
|
||
import ( | ||
"github.com/dogmatiq/enginekit/protobuf/uuidpb" | ||
) | ||
|
||
// journalName returns the name of the journal that contains the state | ||
// of the integration handler with the given key. | ||
func journalName(key *uuidpb.UUID) string { | ||
return "integration:" + key.AsString() | ||
} | ||
|
||
// handledCommandsKeyspaceName returns the name of the keyspace that contains | ||
// the set of handled command IDs. | ||
func handledCommandsKeyspaceName(key *uuidpb.UUID) string { | ||
return "integration:" + key.AsString() + ":handled-commands" | ||
} |
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,6 @@ | ||
package integration | ||
|
||
var ( | ||
JournalName = journalName | ||
HandledCommandsKeyspaceName = handledCommandsKeyspaceName | ||
) |
Oops, something went wrong.