Documentation
¶
Index ¶
- Variables
- type Postgres
- func (pg *Postgres) Backup() (string, error)
- func (pg *Postgres) DeclaredInstances() int64
- func (pg *Postgres) DestroyReplicas() error
- func (pg *Postgres) Execute(pod corev1.Pod, command []string, stdout io.Writer) error
- func (pg *Postgres) GetCronJob() (batchv1beta1.CronJob, error)
- func (pg *Postgres) GetMasterPod() (corev1.Pod, error)
- func (pg *Postgres) GetName() string
- func (pg *Postgres) GetNamespace() string
- func (pg *Postgres) GetNamespaceName() string
- func (pg *Postgres) GetPods(role Role) ([]corev1.Pod, error)
- func (pg *Postgres) IsHealthy() error
- func (pg *Postgres) LogicalBackup() error
- func (pg *Postgres) Switchover() error
- func (pg *Postgres) WaitHealthy(timeout time.Duration) error
- func (pg *Postgres) WrapError(err error) error
- type Role
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrCronJobFailed = errors.New("cron job failed")
View Source
var ErrInvalidMemberCount = errors.New("the number of members don't match intention")
View Source
var ErrInvalidMemberList = errors.New("failed to parse member list")
View Source
var ErrLeaderNotRunning = errors.New("leader is not running")
View Source
var ErrLeaderNumber = errors.New("there is not exactly one Leader")
View Source
var ErrMembersOutOfSync = errors.New("members are out of sync (not the same TL)")
View Source
var ErrMultipleCronJobs = errors.New("multiple dump cron jobs found")
View Source
var ErrNoCronJob = errors.New("no dump cron job found")
View Source
var ErrPositivLag = errors.New("replica lag is not 0")
View Source
var ErrReplicaNotStreaming = errors.New("replica is not streaming")
View Source
var ErrSwitchoverFailed = errors.New("failed to switchover")
View Source
var ErrUnknownLag = errors.New("unknown lag")
View Source
var ErrUnknownRole = errors.New("the member is in an unkown role")
View Source
var GroupVersionResource = schema.GroupVersionResource{
Group: "acid.zalan.do",
Version: "v1",
Resource: "postgresqls",
}
Functions ¶
This section is empty.
Types ¶
type Postgres ¶
type Postgres struct {
// contains filtered or unexported fields
}
func For ¶
func For(ctx context.Context, restConfig *rest.Config, resource unstructured.Unstructured) *Postgres
func (*Postgres) DeclaredInstances ¶
func (*Postgres) DestroyReplicas ¶
func (*Postgres) GetCronJob ¶
func (pg *Postgres) GetCronJob() (batchv1beta1.CronJob, error)
func (*Postgres) GetNamespace ¶
func (*Postgres) GetNamespaceName ¶
func (*Postgres) LogicalBackup ¶
func (*Postgres) Switchover ¶
Click to show internal directories.
Click to hide internal directories.