Documentation ¶
Index ¶
- Constants
- type PatroniCluster
- type PatroniMember
- type PostgresDB
- func (db *PostgresDB) GetClusterName() string
- func (db *PostgresDB) GetPatroniClient() (*http.Client, error)
- func (db *PostgresDB) OpenDB(database string) (*pgx.Conn, error)
- func (db *PostgresDB) String() string
- func (db *PostgresDB) Terminate() error
- func (db *PostgresDB) TriggerBackup(timeout time.Duration) error
- func (db *PostgresDB) WaitFor(timeout time.Duration) error
- func (db *PostgresDB) WithConnection(database string, fn func(*pgx.Conn) error) error
- type PostgresqlDB
- func (db *PostgresqlDB) Backup() error
- func (db *PostgresqlDB) GenerateBackupJob() *kommons.DeploymentBuilder
- func (db *PostgresqlDB) ListBackups(limit int, quiet bool) ([]string, error)
- func (db *PostgresqlDB) ListResticBackups(limit int, quiet bool) ([]string, error)
- func (db *PostgresqlDB) ListS3Backups(limit int, quiet bool) ([]string, error)
- func (db *PostgresqlDB) Restore(fullBackupPath string, trace bool) error
- func (db *PostgresqlDB) RestoreRestic(fullBackupPath string, trace bool) error
- func (db *PostgresqlDB) RestoreS3(backup string, trace bool) error
- type ResticSnapshot
Constants ¶
View Source
const Namespace = "postgres-operator"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PatroniCluster ¶ added in v0.39.0
type PatroniCluster struct {
Members []PatroniMember `json:"members"`
}
type PatroniMember ¶ added in v0.39.0
type PostgresDB ¶
type PostgresDB struct { Name string Namespace string Superuser string Secret string // contains filtered or unexported fields }
nolint: revive
func GetPostgresDB ¶
func (*PostgresDB) GetClusterName ¶ added in v0.39.0
func (db *PostgresDB) GetClusterName() string
func (*PostgresDB) GetPatroniClient ¶ added in v0.39.0
func (db *PostgresDB) GetPatroniClient() (*http.Client, error)
func (*PostgresDB) OpenDB ¶ added in v0.39.0
func (db *PostgresDB) OpenDB(database string) (*pgx.Conn, error)
func (*PostgresDB) String ¶
func (db *PostgresDB) String() string
func (*PostgresDB) Terminate ¶ added in v0.39.0
func (db *PostgresDB) Terminate() error
func (*PostgresDB) TriggerBackup ¶ added in v0.39.0
func (db *PostgresDB) TriggerBackup(timeout time.Duration) error
func (*PostgresDB) WaitFor ¶ added in v0.39.0
func (db *PostgresDB) WaitFor(timeout time.Duration) error
func (*PostgresDB) WithConnection ¶ added in v0.39.0
func (db *PostgresDB) WithConnection(database string, fn func(*pgx.Conn) error) error
type PostgresqlDB ¶ added in v0.46.0
type PostgresqlDB struct { *PostgresDB Restic bool BackupBucket string // contains filtered or unexported fields }
func GetPostgresqlDB ¶ added in v0.46.0
func GetPostgresqlDB(p *platform.Platform, name string) (*PostgresqlDB, error)
func (*PostgresqlDB) Backup ¶ added in v0.46.0
func (db *PostgresqlDB) Backup() error
func (*PostgresqlDB) GenerateBackupJob ¶ added in v0.46.0
func (db *PostgresqlDB) GenerateBackupJob() *kommons.DeploymentBuilder
func (*PostgresqlDB) ListBackups ¶ added in v0.46.0
func (db *PostgresqlDB) ListBackups(limit int, quiet bool) ([]string, error)
func (*PostgresqlDB) ListResticBackups ¶ added in v0.46.0
func (db *PostgresqlDB) ListResticBackups(limit int, quiet bool) ([]string, error)
func (*PostgresqlDB) ListS3Backups ¶ added in v0.46.0
func (db *PostgresqlDB) ListS3Backups(limit int, quiet bool) ([]string, error)
func (*PostgresqlDB) Restore ¶ added in v0.46.0
func (db *PostgresqlDB) Restore(fullBackupPath string, trace bool) error
Restore executes a job to retrieve the logical backup specified and then applies it to the database if trace is true, restore commands are printed to stdout
func (*PostgresqlDB) RestoreRestic ¶ added in v0.46.0
func (db *PostgresqlDB) RestoreRestic(fullBackupPath string, trace bool) error
Click to show internal directories.
Click to hide internal directories.