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

Method GetRestartTimeout

api/v1/cluster_funcs.go:757–759  ·  view source on GitHub ↗

GetRestartTimeout is used to have a timeout for operations that involve a restart of a PostgreSQL instance

()

Source from the content-addressed store, hash-verified

755// GetRestartTimeout is used to have a timeout for operations that involve
756// a restart of a PostgreSQL instance
757func (cluster *Cluster) GetRestartTimeout() time.Duration {
758 return time.Duration(cluster.GetMaxStopDelay()+cluster.GetMaxStartDelay()) * time.Second
759}
760
761// GetPrimaryLeaseDuration returns how long the primary lease is valid before it expires
762func (cluster *Cluster) GetPrimaryLeaseDuration() time.Duration {

Calls 2

GetMaxStopDelayMethod · 0.95
GetMaxStartDelayMethod · 0.95

Tested by

no test coverage detected