mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 21:27:42 +00:00
start implementing new eventstore on iam
This commit is contained in:
@@ -4,6 +4,8 @@ import (
|
||||
"github.com/caos/zitadel/internal/cache/config"
|
||||
"github.com/caos/zitadel/internal/eventstore/internal/repository/sql"
|
||||
"github.com/caos/zitadel/internal/eventstore/models"
|
||||
es_v2 "github.com/caos/zitadel/internal/eventstore/v2"
|
||||
sql_v2 "github.com/caos/zitadel/internal/eventstore/v2/repository/sql"
|
||||
)
|
||||
|
||||
type Config struct {
|
||||
@@ -13,7 +15,7 @@ type Config struct {
|
||||
}
|
||||
|
||||
func Start(conf Config) (Eventstore, error) {
|
||||
repo, err := sql.Start(conf.Repository)
|
||||
repo, sqlClient, err := sql.Start(conf.Repository)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -21,5 +23,6 @@ func Start(conf Config) (Eventstore, error) {
|
||||
return &eventstore{
|
||||
repo: repo,
|
||||
aggregateCreator: models.NewAggregateCreator(conf.ServiceName),
|
||||
esV2: es_v2.NewEventstore(sql_v2.NewCRDB(sqlClient)),
|
||||
}, nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user