Documentation ¶
Index ¶
- func CanSafelyRemoveFromStatus(logger logr.Logger, client fdbadminclient.AdminClient, ...) ([]fdbv1beta2.ProcessAddress, error)
- func DoCoordinatorFaultDomainCheckOnStatus(status *fdbv1beta2.FoundationDBStatus) error
- func DoFaultDomainChecksOnStatus(status *fdbv1beta2.FoundationDBStatus, storageServerCheck bool, ...) error
- func DoLogServerFaultDomainCheckOnStatus(status *fdbv1beta2.FoundationDBStatus) error
- func DoStorageServerFaultDomainCheckOnStatus(status *fdbv1beta2.FoundationDBStatus) error
- func GetCoordinatorsFromStatus(status *fdbv1beta2.FoundationDBStatus) map[string]fdbv1beta2.None
- func GetExclusions(status *fdbv1beta2.FoundationDBStatus) ([]fdbv1beta2.ProcessAddress, error)
- func GetMinimumUptimeAndAddressMap(logger logr.Logger, cluster *fdbv1beta2.FoundationDBCluster, ...) (float64, map[fdbv1beta2.ProcessGroupID][]fdbv1beta2.ProcessAddress, error)
- func HasDesiredFaultToleranceFromStatus(log logr.Logger, status *fdbv1beta2.FoundationDBStatus, ...) bool
- func RemoveWarningsInJSON(jsonString string) ([]byte, error)
- type StatusContextKey
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CanSafelyRemoveFromStatus ¶
func CanSafelyRemoveFromStatus(logger logr.Logger, client fdbadminclient.AdminClient, addresses []fdbv1beta2.ProcessAddress, status *fdbv1beta2.FoundationDBStatus) ([]fdbv1beta2.ProcessAddress, error)
CanSafelyRemoveFromStatus checks whether it is safe to remove processes from the cluster, based on the provided status.
The list returned by this method will be the addresses that are *not* safe to remove.
func DoCoordinatorFaultDomainCheckOnStatus ¶
func DoCoordinatorFaultDomainCheckOnStatus(status *fdbv1beta2.FoundationDBStatus) error
DoCoordinatorFaultDomainCheckOnStatus does a coordinator related fault domain check over the given status object. @note an empty function for now. We will revisit this later.
func DoFaultDomainChecksOnStatus ¶
func DoFaultDomainChecksOnStatus(status *fdbv1beta2.FoundationDBStatus, storageServerCheck bool, logServerCheck bool, coordinatorCheck bool) error
DoFaultDomainChecksOnStatus does the specified fault domain check(s) over the given status object. @note this is a wrapper over the above fault domain related functions.
func DoLogServerFaultDomainCheckOnStatus ¶
func DoLogServerFaultDomainCheckOnStatus(status *fdbv1beta2.FoundationDBStatus) error
DoLogServerFaultDomainCheckOnStatus does a log server related fault domain check over the given status object.
func DoStorageServerFaultDomainCheckOnStatus ¶
func DoStorageServerFaultDomainCheckOnStatus(status *fdbv1beta2.FoundationDBStatus) error
DoStorageServerFaultDomainCheckOnStatus does a storage server related fault domain check over the given status object.
func GetCoordinatorsFromStatus ¶
func GetCoordinatorsFromStatus(status *fdbv1beta2.FoundationDBStatus) map[string]fdbv1beta2.None
GetCoordinatorsFromStatus gets the current coordinators from the status. The returning set will contain all processes by their process group ID.
func GetExclusions ¶
func GetExclusions(status *fdbv1beta2.FoundationDBStatus) ([]fdbv1beta2.ProcessAddress, error)
GetExclusions gets a list of the addresses currently excluded from the database, based on the provided status.
func GetMinimumUptimeAndAddressMap ¶
func GetMinimumUptimeAndAddressMap(logger logr.Logger, cluster *fdbv1beta2.FoundationDBCluster, status *fdbv1beta2.FoundationDBStatus, recoveryStateEnabled bool) (float64, map[fdbv1beta2.ProcessGroupID][]fdbv1beta2.ProcessAddress, error)
GetMinimumUptimeAndAddressMap returns address map of the processes included the the foundationdb status. The minimum uptime will be either secondsSinceLastRecovered if the recovery state is supported and enabled otherwise we will take the minimum uptime of all processes.
func HasDesiredFaultToleranceFromStatus ¶
func HasDesiredFaultToleranceFromStatus(log logr.Logger, status *fdbv1beta2.FoundationDBStatus, cluster *fdbv1beta2.FoundationDBCluster) bool
HasDesiredFaultToleranceFromStatus checks if the cluster has the desired fault tolerance based on the provided status.
func RemoveWarningsInJSON ¶
RemoveWarningsInJSON removes any warning messages that might appear in the status output from the fdbcli and returns the JSON output without the warning message.
Types ¶
type StatusContextKey ¶
type StatusContextKey struct{}
StatusContextKey will be used as a key in a context to pass down the cached status.