zitadel/internal/eventstore/config.go
Livio Spring d21bb902f1
fix: push timeout (#4882) (#4885)
* push with timeout

* test: config for eventstore

(cherry picked from commit b9156da76d)

Co-authored-by: Silvan <silvan.reusser@gmail.com>
2022-12-15 09:40:13 +00:00

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
}