publicationmanager

package
v0.0.0-...-a4686c1 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AivenManager

type AivenManager struct {
	StdManager
}

AivenManager is a publication manager for Aiven PostgreSQL. It uses the aiven-extras extension to manage publications. See: https://github.com/aiven/aiven-extras

func (*AivenManager) AlterExistingPublication

func (m *AivenManager) AlterExistingPublication(
	ctx context.Context,
	publication *postgresv1alpha1.PostgresPublication,
) error

func (*AivenManager) CreatePublication

func (m *AivenManager) CreatePublication(
	ctx context.Context,
	publication *postgresv1alpha1.PostgresPublication,
) (bool, error)

func (*AivenManager) DropPublication

func (m *AivenManager) DropPublication(
	ctx context.Context,
	name string,
) error

type Manager

type Manager interface {
	CreatePublication(
		ctx context.Context,
		publication *postgresv1alpha1.PostgresPublication,
	) (created bool, err error)

	AlterExistingPublication(
		ctx context.Context,
		publication *postgresv1alpha1.PostgresPublication,
	) error

	DropPublication(
		ctx context.Context,
		name string,
	) error
}

Manager represents something that is able to manage publications on a PostgreSQL server. This interface is created to cater for the different ways to manage PostgreSQL publications depending on the specific database-as-a-service provider.

type StdManager

type StdManager struct {
	Conn conn
}

StdManager is a standard publication manager. It uses regular CREATE/ALTER/DROP PUBLICATION commands to manipulate publications on a PostgreSQL server.

func (*StdManager) AlterExistingPublication

func (m *StdManager) AlterExistingPublication(
	ctx context.Context,
	publication *postgresv1alpha1.PostgresPublication,
) error

func (*StdManager) CreatePublication

func (m *StdManager) CreatePublication(
	ctx context.Context,
	publication *postgresv1alpha1.PostgresPublication,
) (bool, error)

func (*StdManager) DropPublication

func (m *StdManager) DropPublication(
	ctx context.Context,
	name string,
) error

Jump to

Keyboard shortcuts

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