phase

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package phase tracks whether a running pgstream process is in the initial snapshot or logical replication (streaming) phase.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Phase

type Phase string

Phase identifies the current pipeline stage.

const (
	// Snapshot is the initial data/schema snapshot stage.
	Snapshot Phase = "snapshot"
	// Replication is the logical replication / streaming stage.
	Replication Phase = "replication"
)

type Tracker

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

Tracker holds the current pipeline phase. It is safe for concurrent use.

func NewTracker

func NewTracker() *Tracker

NewTracker returns a tracker with an empty phase until the first Set.

func (*Tracker) Get

func (t *Tracker) Get() Phase

Get returns the current phase, or empty if unset / tracker is nil.

func (*Tracker) Set

func (t *Tracker) Set(p Phase)

Set updates the current phase.

Jump to

Keyboard shortcuts

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