postgresql

package
v0.0.0-...-5a0e1a0 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PostgreSQL

type PostgreSQL struct {
	// contains filtered or unexported fields
}

PostgreSQL abstracts PostgreSQL client.

func NewPostgreSQL

func NewPostgreSQL() (*PostgreSQL, error)

NewPostgreSQL creates a new instance of PostgreSQL object.

func (*PostgreSQL) GetAccessibleManagedClusters

func (p *PostgreSQL) GetAccessibleManagedClusters(ctx context.Context, tableName string,
	filterClause string,
) (map[string]set.Set, error)

GetAccessibleManagedClusters gets a map of hub -> set { managed-clusters } that are accessible with the given filter clause (WHERE ...).

func (*PostgreSQL) Stop

func (p *PostgreSQL) Stop()

Stop stops PostgreSQL and closes the connection pool.

func (*PostgreSQL) UpdateLabelForManagedClusters

func (p *PostgreSQL) UpdateLabelForManagedClusters(ctx context.Context, tableName string, labelKey string,
	labelValue string, hubToManagedClustersMap map[string]set.Set,
) error

UpdateLabelForManagedClusters receives a map of hub -> set of managed clusters and updates their labels to be appended by the given label

If the operation fails, hubToManagedClustersMap will contain un-synced entries only.

Jump to

Keyboard shortcuts

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