Documentation ¶
Index ¶
- Constants
- type PatroniCluster
- type PatroniMember
- type PostgresDB
- func (db *PostgresDB) Backup() error
- func (db *PostgresDB) GenerateBackupJob() *kommons.DeploymentBuilder
- func (db *PostgresDB) GetClusterName() string
- func (db *PostgresDB) GetPatroniClient() (*http.Client, error)
- func (db *PostgresDB) ListBackups(s3Bucket string, limit int, quiet bool) ([]string, error)
- func (db *PostgresDB) OpenDB(database string) (*pg.DB, error)
- func (db *PostgresDB) Restore(fullBackupPath string) error
- func (db *PostgresDB) ScheduleBackup(schedule string) 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(*pg.DB) error) 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: golint
func GetPostgresDB ¶
func GetPostgresDB(client *kommons.Client, name string) (*PostgresDB, error)
func (*PostgresDB) Backup ¶
func (db *PostgresDB) Backup() error
func (*PostgresDB) GenerateBackupJob ¶
func (db *PostgresDB) GenerateBackupJob() *kommons.DeploymentBuilder
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) ListBackups ¶
func (*PostgresDB) OpenDB ¶ added in v0.39.0
func (db *PostgresDB) OpenDB(database string) (*pg.DB, error)
func (*PostgresDB) Restore ¶
func (db *PostgresDB) Restore(fullBackupPath string) error
func (*PostgresDB) ScheduleBackup ¶
func (db *PostgresDB) ScheduleBackup(schedule string) 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(*pg.DB) error) error
Click to show internal directories.
Click to hide internal directories.