version

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package version is used to track incompatible schema changes within the staging tables. This package does not assume that breaking changes are necessarily linear.

In the future, new versions could trigger a lease acquisition and an automated migration. For the moment, we'll print a list of PR numbers that will contain information about the breaking change.

To introduce a new version, add an entry to the tail of the Versions array, create a PR, and then update the entry with the new PR number.

Index

Constants

This section is empty.

Variables

Set is used by Wire.

View Source
var Versions = []Version{
	{"Add versions table", 400},
	{"Support single-level schema namespaces", 389},
	{"Track applied in staging table", 572},
	{"Migrate resolved_timestamps to checkpoints", 828},
}

Versions contains breaking changes to the Replicator metadata tables.

Functions

This section is empty.

Types

type Checker

type Checker struct {
	Memo        types.Memo
	StagingPool *types.StagingPool
}

Checker ensures that a set of version entries exists in the memo table so that we can provide useful messages to users on how to perform Replicator metadata schema fixups.

func ProvideChecker

func ProvideChecker(db *types.StagingPool, memo types.Memo) *Checker

ProvideChecker is called by Wire.

func (*Checker) Check

func (c *Checker) Check(ctx context.Context) ([]string, error)

Check will produce a report of PRs that have not been applied to the

type Version

type Version struct {
	Info string // A short string for human consumption.
	PR   int    // The pull request number which introduces the incompatible change.
}

A Version describes a breaking change in the Replicator metadata tables.

func (*Version) String

func (v *Version) String() string

String is for debugging use only. Use Version.Warning for a user-friendly message.

func (*Version) Warning

func (v *Version) Warning() string

Warning returns a user-facing warning message to describe the Version.

Jump to

Keyboard shortcuts

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