zitadel/internal/eventstore/config.go
Silvan e38abdcdf3
perf: query data AS OF SYSTEM TIME (#5231)
Queries the data in the storage layser at the timestamp when the call hit the API layer
2023-02-27 22:36:43 +01:00

26 lines
543 B
Go

package eventstore
import (
"time"
"github.com/zitadel/zitadel/internal/database"
"github.com/zitadel/zitadel/internal/eventstore/repository"
z_sql "github.com/zitadel/zitadel/internal/eventstore/repository/sql"
)
type Config struct {
PushTimeout time.Duration
Client *database.DB
repo repository.Repository
}
func TestConfig(repo repository.Repository) *Config {
return &Config{repo: repo}
}
func Start(config *Config) (*Eventstore, error) {
config.repo = z_sql.NewCRDB(config.Client)
return NewEventstore(config), nil
}