mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 19:17:32 +00:00
* push with timeout
* test: config for eventstore
(cherry picked from commit b9156da76d
)
Co-authored-by: Silvan <silvan.reusser@gmail.com>
This commit is contained in:
@@ -2,10 +2,24 @@ package eventstore
|
||||
|
||||
import (
|
||||
"database/sql"
|
||||
"time"
|
||||
|
||||
"github.com/zitadel/zitadel/internal/eventstore/repository"
|
||||
z_sql "github.com/zitadel/zitadel/internal/eventstore/repository/sql"
|
||||
)
|
||||
|
||||
func Start(sqlClient *sql.DB) (*Eventstore, error) {
|
||||
return NewEventstore(z_sql.NewCRDB(sqlClient)), nil
|
||||
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
|
||||
}
|
||||
|
Reference in New Issue
Block a user