Documentation
¶
Overview ¶
Package remote contains the client capable of querying the webserver remote endpoint.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface {
Instance() InstanceClient
}
Client is the interface to interact with the remote webserver
type HTTPScheme ¶
type HTTPScheme string
HTTPScheme identifies a valid scheme: http, https
func GetStatusSchemeFromPod ¶
func GetStatusSchemeFromPod(pod *corev1.Pod) HTTPScheme
GetStatusSchemeFromPod detects if a Pod is exposing the status via HTTP or HTTPS
func (HTTPScheme) ToString ¶
func (h HTTPScheme) ToString() string
ToString returns the scheme as a string value
type InstanceClient ¶
type InstanceClient interface {
// GetStatusFromInstances gets the replication status from the PostgreSQL instances,
// the returned list is sorted in order to have the primary as the first element
// and the other instances in their election order
GetStatusFromInstances(
ctx context.Context,
pods corev1.PodList,
) postgres.PostgresqlStatusList
// GetPgControlDataFromInstance obtains the pg_controldata from the instance HTTP endpoint
GetPgControlDataFromInstance(
ctx context.Context,
pod *corev1.Pod,
) (string, error)
// UpgradeInstanceManager upgrades the instance manager to the passed availableArchitecture
UpgradeInstanceManager(
ctx context.Context,
pod *corev1.Pod,
availableArchitecture *utils.AvailableArchitecture,
) error
// ArchivePartialWAL trigger the archiver for the latest partial WAL
// file created in a specific Pod
ArchivePartialWAL(context.Context, *corev1.Pod) (string, error)
}
InstanceClient a http client capable of querying the instance HTTP endpoints
type StatusError ¶
An StatusError reports an unsuccessful attempt to retrieve an instance status
func (StatusError) Error ¶
func (i StatusError) Error() string
Click to show internal directories.
Click to hide internal directories.