// Package errkit defines sentinel errors shared across packages in the go-kv module.
//
// These errors live in a leaf package to avoid import cycles: both the root
// package and sub-packages (wal, memtable, etc.) can import errkit without
// creating circular dependencies.
package errkit

import "errors"

// ErrCommitUnknown indicates the commit result is indeterminate: the WAL write
// was attempted but the caller cannot assume the write definitely failed or
// succeeded. The caller must query the commit state before retrying.
var ErrCommitUnknown = errors.New("go-kv: commit result unknown")

// ErrWriteStopped indicates the engine has entered a write-stopped state and
// rejects all subsequent writes.
var ErrWriteStopped = errors.New("go-kv: write stopped")

// ErrSequenceExhausted indicates the sequence number space is exhausted. The
// engine enters a terminal state requiring database migration or rebuild.
var ErrSequenceExhausted = errors.New("go-kv: sequence exhausted")

// ErrWALCorrupted indicates WAL data corruption was detected.
var ErrWALCorrupted = errors.New("go-kv: WAL corrupted")

// ErrInvalidConfig indicates an invalid configuration was provided.
var ErrInvalidConfig = errors.New("go-kv: invalid config")
