Skip to content

Commit

Permalink
Replace persistence package with persistencekit.
Browse files Browse the repository at this point in the history
  • Loading branch information
jmalloc committed Mar 1, 2024
1 parent 9650153 commit 3c696b6
Show file tree
Hide file tree
Showing 59 changed files with 141 additions and 3,357 deletions.
7 changes: 4 additions & 3 deletions cmd/example/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,17 @@ import (
"syscall"

"github.com/dogmatiq/example"
"github.com/dogmatiq/persistencekit/driver/memory/memoryjournal"
"github.com/dogmatiq/persistencekit/driver/memory/memorykv"
"github.com/dogmatiq/veracity"
"github.com/dogmatiq/veracity/persistence/driver/memory"
"golang.org/x/exp/slog"
)

func main() {
e := veracity.New(
&example.App{},
veracity.WithJournalStore(&memory.JournalStore{}),
veracity.WithKeyValueStore(&memory.KeyValueStore{}),
veracity.WithJournalStore(&memoryjournal.Store{}),
veracity.WithKeyValueStore(&memorykv.Store{}),
veracity.WithLogger(
slog.New(
slog.NewJSONHandler(
Expand Down
4 changes: 2 additions & 2 deletions engineoption.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ package veracity

import (
"github.com/dogmatiq/enginekit/protobuf/uuidpb"
"github.com/dogmatiq/persistencekit/journal"
"github.com/dogmatiq/persistencekit/kv"
"github.com/dogmatiq/veracity/internal/engineconfig"
"github.com/dogmatiq/veracity/persistence/journal"
"github.com/dogmatiq/veracity/persistence/kv"
"go.opentelemetry.io/otel/metric"
"go.opentelemetry.io/otel/trace"
"golang.org/x/exp/slog"
Expand Down
6 changes: 3 additions & 3 deletions engineshutdown.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ import (

const defaultShutdownTimeout = 15 * time.Second

// shutdownContextFor returns a context for shutting down an engine subsystem that
// has stopped because ctx is done.
// shutdownContextFor returns a context for shutting down an engine subsystem
// that has stopped because ctx is done.
//
// The returned context is NOT a child of ctx, as ctx is expected to have
// already been canceled.
func shutdownContextFor(ctx context.Context) (context.Context, context.CancelFunc) {
func shutdownContextFor(context.Context) (context.Context, context.CancelFunc) {
// TODO: use ctx's cancel cause to obtain a shutdown context that is
// controlled by the user.
return context.WithTimeout(context.Background(), defaultShutdownTimeout)
Expand Down
31 changes: 1 addition & 30 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@ module github.com/dogmatiq/veracity
go 1.22

require (
github.com/aws/aws-sdk-go-v2 v1.25.2
github.com/aws/aws-sdk-go-v2/config v1.27.4
github.com/aws/aws-sdk-go-v2/credentials v1.17.4
github.com/aws/aws-sdk-go-v2/service/dynamodb v1.30.1
github.com/cespare/xxhash/v2 v2.2.0
github.com/dogmatiq/configkit v0.12.2
github.com/dogmatiq/discoverkit v0.1.2
Expand All @@ -15,8 +11,8 @@ require (
github.com/dogmatiq/example v0.0.0-20230606031437-2bd84c72050b
github.com/dogmatiq/ferrite v1.2.1
github.com/dogmatiq/marshalkit v0.7.3
github.com/dogmatiq/persistencekit v0.2.0
github.com/dogmatiq/primo v0.2.0
github.com/dogmatiq/sqltest v0.3.0
github.com/google/go-cmp v0.6.0
go.opentelemetry.io/otel v1.24.0
go.opentelemetry.io/otel/metric v1.24.0
Expand All @@ -29,17 +25,6 @@ require (
)

require (
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.15.2 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.2 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.2 // indirect
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.1 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery v1.9.2 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.2 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.20.1 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.23.1 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.28.1 // indirect
github.com/aws/smithy-go v1.20.1 // indirect
github.com/dogmatiq/cosyne v0.2.0 // indirect
github.com/dogmatiq/iago v0.4.0 // indirect
github.com/dogmatiq/interopspec v0.5.3 // indirect
Expand All @@ -48,29 +33,15 @@ require (
github.com/fxamacker/cbor/v2 v2.4.0 // indirect
github.com/go-logr/logr v1.4.1 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-sql-driver/mysql v1.5.0 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/jackc/chunkreader/v2 v2.0.1 // indirect
github.com/jackc/pgconn v1.8.0 // indirect
github.com/jackc/pgio v1.0.0 // indirect
github.com/jackc/pgpassfile v1.0.0 // indirect
github.com/jackc/pgproto3/v2 v2.0.6 // indirect
github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b // indirect
github.com/jackc/pgtype v1.6.2 // indirect
github.com/jackc/pgx/v4 v4.10.0 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/lib/pq v1.9.0 // indirect
github.com/mattn/go-runewidth v0.0.15 // indirect
github.com/mattn/go-sqlite3 v1.14.17 // indirect
github.com/rivo/uniseg v0.4.4 // indirect
github.com/x448/float16 v0.8.4 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/crypto v0.18.0 // indirect
golang.org/x/net v0.20.0 // indirect
golang.org/x/sys v0.16.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Loading

0 comments on commit 3c696b6

Please sign in to comment.