postgresoperator

package
v0.38.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 26, 2021 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Namespace = "postgres-operator"
)

Variables

This section is empty.

Functions

func Deploy

func Deploy(platform *platform.Platform) error

func GetOrCreateDB

func GetOrCreateDB(p *platform.Platform, config postgres.ClusterConfig) (*types.DB, error)

func GetPatroniClient

func GetPatroniClient(p *platform.Platform, namespace, clusterName string) (*http.Client, error)

func Test

func Test(p *platform.Platform, test *console.TestResults)

func TestCloneDBFromWAL added in v0.36.0

func TestCloneDBFromWAL(p *platform.Platform, test *console.TestResults)

func TestLogicalBackupE2E added in v0.36.0

func TestLogicalBackupE2E(p *platform.Platform, test *console.TestResults)

TestLogicalBackupE2E will test the logical backup function that comes with the db.flanksource.com/PostgresqlDB by: - Create a PG Cluster with db.flanksource.com/PostgresqlDB - Insert test fixtures to the database - Trigger the backup CronJob so we can have a fresh logical backup of the cluster - Spin up a new PG Cluster with db.flanksource.com/PostgresqlDB - Run the restore command to restore the data of the first PG Cluster to the second cluster - Check the test fixtures is in the second cluster

Types

type ClusterResponse

type ClusterResponse struct {
	Members []ClusterResponseMember `json:"members"`
}

type ClusterResponseMember

type ClusterResponseMember struct {
	Name     string      `json:"name"`
	Host     string      `json:"host"`
	Port     int         `json:"port"`
	Role     string      `json:"role"`
	State    string      `json:"state"`
	URL      string      `json:"api_url"`
	Timeline int         `json:"timeline"`
	Lag      interface{} `json:"lag"`
}
type Link struct {
	ID  int64
	URL string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL