Private
Public Access
1
0

Database config parameter

This commit is contained in:
2023-07-08 22:15:03 -07:00
parent 6583a36514
commit 1963aae0b7
6 changed files with 32 additions and 484 deletions

View File

@@ -31,12 +31,12 @@ type Server struct {
tracer otrace.Tracer
}
func NewServer(ctx context.Context) (*Server, error) {
ch, err := chdb.New("database.yaml")
func NewServer(ctx context.Context, configFile string) (*Server, error) {
ch, err := chdb.New(configFile)
if err != nil {
return nil, fmt.Errorf("clickhouse open: %w", err)
}
db, err := ntpdb.OpenDB("database.yaml")
db, err := ntpdb.OpenDB(configFile)
if err != nil {
return nil, fmt.Errorf("mysql open: %w", err)
}