Skip to content

Commit

Permalink
Implementing new methods from servercfg.DoltgresConfig
Browse files Browse the repository at this point in the history
  • Loading branch information
fulghum committed Jan 13, 2025
1 parent 7f91aea commit 0de6241
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ func runServer(ctx context.Context, cfg *servercfg.DoltgresConfig, dEnv *env.Dol
}
}()

sqlserver.ConfigureServices(ssCfg, controller, Version, dEnv)
sqlserver.ConfigureServices(ssCfg, controller, Version, dEnv, false)

Check failure on line 159 in server/server.go

View workflow job for this annotation

GitHub Actions / Verify format

too many arguments in call to sqlserver.ConfigureServices

Check failure on line 159 in server/server.go

View workflow job for this annotation

GitHub Actions / test (ubuntu-latest)

too many arguments in call to sqlserver.ConfigureServices

Check failure on line 159 in server/server.go

View workflow job for this annotation

GitHub Actions / Run Staticcheck

too many arguments in call to sqlserver.ConfigureServices

Check failure on line 159 in server/server.go

View workflow job for this annotation

GitHub Actions / test (ubuntu-latest)

too many arguments in call to sqlserver.ConfigureServices

Check failure on line 159 in server/server.go

View workflow job for this annotation

GitHub Actions / test (macos-latest)

too many arguments in call to sqlserver.ConfigureServices

Check failure on line 159 in server/server.go

View workflow job for this annotation

GitHub Actions / Bats tests (ubuntu-22.04)

too many arguments in call to sqlserver.ConfigureServices

Check failure on line 159 in server/server.go

View workflow job for this annotation

GitHub Actions / test (windows-latest)

too many arguments in call to sqlserver.ConfigureServices

Check failure on line 159 in server/server.go

View workflow job for this annotation

GitHub Actions / test (macos-latest)

too many arguments in call to sqlserver.ConfigureServices

Check failure on line 159 in server/server.go

View workflow job for this annotation

GitHub Actions / Bats tests (macos-latest)

too many arguments in call to sqlserver.ConfigureServices

Check failure on line 159 in server/server.go

View workflow job for this annotation

GitHub Actions / test (windows-latest)

too many arguments in call to sqlserver.ConfigureServices
go controller.Start(newCtx)

err = controller.WaitForStart()
Expand Down
6 changes: 6 additions & 0 deletions servercfg/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,8 @@ type DoltgresConfig struct {
PostgresReplicationConfig *PostgresReplicationConfig `yaml:"postgres_replication,omitempty" minver:"0.7.4"`
}

var _ servercfg.ServerConfig = (*DoltgresConfig)(nil)

// Ptr is a helper function that returns a pointer to the value passed in. This is necessary to e.g. get a pointer to
// a const value without assigning to an intermediate variable.
func Ptr[T any](v T) *T {
Expand Down Expand Up @@ -227,6 +229,10 @@ func (cfg *DoltgresConfig) User() string {
return *cfg.UserConfig.Name
}

func (cfg *DoltgresConfig) UserIsSpecified() bool {
return cfg.UserConfig != nil && cfg.UserConfig.Name != nil
}

func (cfg *DoltgresConfig) Password() string {
if cfg.UserConfig == nil || cfg.UserConfig.Password == nil {
return "password"
Expand Down

0 comments on commit 0de6241

Please sign in to comment.