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

Function getWalArchivingStatus

internal/cmd/plugin/status/status.go:657–668  ·  view source on GitHub ↗
(isArchivingWAL bool, lastFailedWAL string, isWalArchivingDisabled bool)

Source from the content-addressed store, hash-verified

655}
656
657func getWalArchivingStatus(isArchivingWAL bool, lastFailedWAL string, isWalArchivingDisabled bool) string {
658 switch {
659 case isWalArchivingDisabled:
660 return aurora.Yellow("Disabled").String()
661 case isArchivingWAL:
662 return aurora.Green("OK").String()
663 case lastFailedWAL != "":
664 return aurora.Red("Failing").String()
665 default:
666 return aurora.Yellow("Starting Up").String()
667 }
668}
669
670func (fullStatus *PostgresqlStatus) areReplicationSlotsEnabled() bool {
671 return fullStatus.Cluster.Spec.ReplicationSlots != nil &&

Callers 2

status_test.goFile · 0.85

Calls 1

StringMethod · 0.45

Tested by

no test coverage detected