infrastructure

package
v1.25.2 Latest Latest
Warning

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

Go to latest
Published: May 23, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package infrastructure contains the structs and interfaces needed to manage replication slots

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create added in v1.23.6

func Create(ctx context.Context, db *sql.DB, slot ReplicationSlot) error

Create the replication slot

func Delete added in v1.23.6

func Delete(ctx context.Context, db *sql.DB, slot ReplicationSlot) error

Delete the replication slot

func Update added in v1.23.6

func Update(ctx context.Context, db *sql.DB, slot ReplicationSlot) error

Update the replication slot

Types

type ReplicationSlot

type ReplicationSlot struct {
	SlotName   string   `json:"slotName,omitempty"`
	Type       SlotType `json:"type,omitempty"`
	Active     bool     `json:"active"`
	RestartLSN string   `json:"restartLSN,omitempty"`
	IsHA       bool     `json:"isHA,omitempty"`
	HoldsXmin  bool     `json:"holdsXmin,omitempty"`
}

ReplicationSlot represents a single replication slot

type ReplicationSlotList

type ReplicationSlotList struct {
	Items []ReplicationSlot
}

ReplicationSlotList contains a list of replication slots

func List added in v1.23.6

List the available replication slots

func (ReplicationSlotList) Get

Get returns the ReplicationSlot with the required name if present in the ReplicationSlotList

func (ReplicationSlotList) Has

func (sl ReplicationSlotList) Has(name string) bool

Has returns true is a ReplicationSlot with the required name if present in the ReplicationSlotList

type SlotType

type SlotType string

SlotType represents the type of replication slot

const SlotTypePhysical SlotType = "physical"

SlotTypePhysical represents the physical replication slot

Jump to

Keyboard shortcuts

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