start implementing new eventstore on iam

This commit is contained in:
adlerhurst
2020-11-12 22:50:01 +01:00
parent 720fea4bcc
commit 23e6cad703
48 changed files with 1609 additions and 84 deletions

View File

@@ -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
}