mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-12 11:04:25 +00:00
e38abdcdf3
Queries the data in the storage layser at the timestamp when the call hit the API layer
26 lines
543 B
Go
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
|
|
}
|