mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-12 02:54:20 +00:00
d21bb902f1
* push with timeout
* test: config for eventstore
(cherry picked from commit b9156da76d
)
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
|
|
}
|