migrate

package
v0.8.9 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const CurrentSchemaVersion = 1

CurrentSchemaVersion is the schema_version this build reads and writes. Bump in lockstep with any breaking change to the kcp-state.json shape, and add the matching upcaster to steps (see internal/state/migrate/steps.go).

Variables

View Source
var ErrNewerSchema = errors.New("state file schema is newer than this KCP build supports")

ErrNewerSchema means the file was written by a newer (released) KCP than this build can model.

View Source
var ErrNewerSchemaDev = errors.New("state file schema is newer than this KCP build supports and was written by a development build")

ErrNewerSchemaDev is ErrNewerSchema's variant for a file STAMPED by a dev build (its declared schema_version may correspond to an unreleased/local shape — see spec §6.9).

View Source
var ErrUnsupportedLegacy = errors.New("state file is from an unsupported legacy format")

ErrUnsupportedLegacy means the file is an old shape for which no upcaster exists yet.

Functions

func Upgrade

func Upgrade(data []byte) (migrated []byte, fromLabel string, err error)

Upgrade transforms raw kcp-state.json bytes of any prior shape into bytes conforming to CurrentSchemaVersion. It never decodes into types.State. fromLabel is a human-readable description of the detected source shape.

Types

This section is empty.

Jump to

Keyboard shortcuts

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