checkpoint

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package checkpoint defines durable resume contracts enforcing ST-1 and ST-2.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Checkpoint

type Checkpoint struct {
	Schema            string
	Table             string
	ShadowTable       string
	SlotName          string
	PublicationName   string
	Watermark         copier.Watermark
	LastAppliedLSN    decode.LSN
	SourceFingerprint string
	TargetFingerprint string
	Phase             Phase
	UpdatedAt         time.Time
}

Checkpoint is the single durable resume record.

type Phase

type Phase uint8

Phase identifies the durable schema-change phase. Values are opaque labels: the happy path visits them in declaration order, but PhaseFailed is reachable from any phase, so callers never compare phases for order — they switch on the value or ask Terminal.

const (
	// PhaseCopying copies source rows.
	PhaseCopying Phase = iota + 1
	// PhaseCatchingUp applies captured changes.
	PhaseCatchingUp
	// PhaseVerifying verifies convergence.
	PhaseVerifying
	// PhaseCutover performs the swap.
	PhaseCutover
	// PhaseDone is successful and terminal.
	PhaseDone
	// PhaseFailed is unsuccessful and terminal.
	PhaseFailed
)

func (Phase) String

func (p Phase) String() string

String returns the stable phase name.

func (Phase) Terminal

func (p Phase) Terminal() bool

Terminal reports whether the phase is an end state that resume must not re-enter.

Jump to

Keyboard shortcuts

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