mirror of
https://github.com/zitadel/zitadel.git
synced 2025-01-05 22:52:46 +00:00
d21bb902f1
* push with timeout * test: config for eventstore (cherry picked from commit b9156da76d0f03075589b50eafbf9f48160a0301) Co-authored-by: Silvan <silvan.reusser@gmail.com>
26 lines
506 B
Go
26 lines
506 B
Go
package eventstore
|
|
|
|
import (
|
|
"database/sql"
|
|
"time"
|
|
|
|
"github.com/zitadel/zitadel/internal/eventstore/repository"
|
|
z_sql "github.com/zitadel/zitadel/internal/eventstore/repository/sql"
|
|
)
|
|
|
|
type Config struct {
|
|
PushTimeout time.Duration
|
|
Client *sql.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
|
|
}
|