Documentation ¶
Overview ¶
Package instance contains the client capable of querying the HTTP instances endpoints
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type StatusClient ¶
StatusClient a http client capable of querying the instance HTTP endpoints
func NewStatusClient ¶
func NewStatusClient() *StatusClient
NewStatusClient returns a client capable of querying the instance HTTP endpoints
func (*StatusClient) GetPgControlDataFromInstance ¶
func (r *StatusClient) GetPgControlDataFromInstance( ctx context.Context, pod *corev1.Pod, ) (string, error)
GetPgControlDataFromInstance obtains the pg_controldata from the instance HTTP endpoint
func (*StatusClient) GetStatusFromInstances ¶
func (r *StatusClient) GetStatusFromInstances( ctx context.Context, pods corev1.PodList, ) postgres.PostgresqlStatusList
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
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.