MCPcopy Create free account
hub / github.com/cloudnative-pg/cloudnative-pg / GetSocketDir

Function GetSocketDir

pkg/management/postgres/instance.go:487–494  ·  view source on GitHub ↗

GetSocketDir gets the name of the directory that will contain the Unix socket for the PostgreSQL server. This is detected using the PGHOST environment variable or using a default

()

Source from the content-addressed store, hash-verified

485// the Unix socket for the PostgreSQL server. This is detected using
486// the PGHOST environment variable or using a default
487func GetSocketDir() string {
488 socketDir := os.Getenv("PGHOST")
489 if socketDir == "" {
490 socketDir = postgres.SocketDirectory
491 }
492
493 return socketDir
494}
495
496// GetServerPort gets the port where the postmaster will be listening
497// using the environment variable or, when empty, the default one

Callers 6

instance_test.goFile · 0.85
StartupMethod · 0.85
RunMethod · 0.85
ConnectionPoolMethod · 0.85
metricsConnectionPoolMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected