feat: initialize project structure and error types

- go.mod with github.com/dailz/go-kv, Go 1.26.3, testify
- config/config.go with WalConfig, Validate() with checked arithmetic
- errors.go with sentinel errors (ErrCommitUnknown, ErrWriteStopped, etc.)
- wal/constants.go with all WAL format constants and enums
- wal/header.go with WAL File Header encode/decode (CRC32 IEEE)
- wal/record.go with Physical Record codec, block boundary, SplitIntoRecords
- wal/entry.go with WAL Entry codec (varint keys/values, OpType, ValueKind)
- wal/sequence.go with SequenceManager (atomic, CAS, overflow-safe)
- manifest/manifest.go with MANIFEST stub (Load/Save atomic)
- manifest/current.go with CURRENT file (WriteCurrent/ReadCurrent)
- Comprehensive tests for all modules
- .golangci.yml configuration
This commit is contained in:
dailz
2026-06-12 13:23:27 +08:00
parent 59de99ca0b
commit cf913b1d52
52 changed files with 4538 additions and 0 deletions
@@ -0,0 +1,10 @@
{
"sessionID": "ses_1465a5321ffevd4inJJZXxFenJ",
"updatedAt": "2026-06-12T02:26:27.295Z",
"sources": {
"background-task": {
"state": "idle",
"updatedAt": "2026-06-12T02:26:27.295Z"
}
}
}
@@ -0,0 +1,10 @@
{
"sessionID": "ses_1468f0cc5ffew53IA0I4W6HijM",
"updatedAt": "2026-06-12T01:41:18.251Z",
"sources": {
"background-task": {
"state": "idle",
"updatedAt": "2026-06-12T01:41:18.251Z"
}
}
}
@@ -0,0 +1,10 @@
{
"sessionID": "ses_1469860f1ffeAxT7jbUD3T1ZK5",
"updatedAt": "2026-06-12T01:18:59.508Z",
"sources": {
"background-task": {
"state": "idle",
"updatedAt": "2026-06-12T01:18:59.508Z"
}
}
}
@@ -0,0 +1,10 @@
{
"sessionID": "ses_146adbaa4ffehxje0lmKRg4ZpT",
"updatedAt": "2026-06-12T00:56:53.921Z",
"sources": {
"background-task": {
"state": "idle",
"updatedAt": "2026-06-12T00:56:53.921Z"
}
}
}
@@ -0,0 +1,10 @@
{
"sessionID": "ses_146b864adffetMjZkc08p16onz",
"updatedAt": "2026-06-12T00:44:22.791Z",
"sources": {
"background-task": {
"state": "idle",
"updatedAt": "2026-06-12T00:44:22.791Z"
}
}
}
@@ -0,0 +1,10 @@
{
"sessionID": "ses_146c330caffehDbiMQ7M0jL3Il",
"updatedAt": "2026-06-12T00:31:46.022Z",
"sources": {
"background-task": {
"state": "idle",
"updatedAt": "2026-06-12T00:31:46.022Z"
}
}
}
@@ -0,0 +1,10 @@
{
"sessionID": "ses_149585098ffeVZ53676PRrr2ic",
"updatedAt": "2026-06-11T12:31:44.016Z",
"sources": {
"background-task": {
"state": "idle",
"updatedAt": "2026-06-11T12:31:44.016Z"
}
}
}
@@ -0,0 +1,10 @@
{
"sessionID": "ses_14960b98effe7YjeN56yvxsoN3",
"updatedAt": "2026-06-11T12:21:18.579Z",
"sources": {
"background-task": {
"state": "idle",
"updatedAt": "2026-06-11T12:21:18.579Z"
}
}
}
@@ -0,0 +1,10 @@
{
"sessionID": "ses_14967e191ffeLfQYyfTQHP5TlH",
"updatedAt": "2026-06-11T12:12:33.047Z",
"sources": {
"background-task": {
"state": "idle",
"updatedAt": "2026-06-11T12:12:33.047Z"
}
}
}
@@ -0,0 +1,10 @@
{
"sessionID": "ses_149a13a61ffehpTGChldqMe0do",
"updatedAt": "2026-06-11T11:11:39.805Z",
"sources": {
"background-task": {
"state": "idle",
"updatedAt": "2026-06-11T11:11:39.805Z"
}
}
}
@@ -0,0 +1,10 @@
{
"sessionID": "ses_149e4f0c5ffe5hf5hErOGwmaO7",
"updatedAt": "2026-06-11T10:01:28.529Z",
"sources": {
"background-task": {
"state": "idle",
"updatedAt": "2026-06-11T10:01:28.529Z"
}
}
}
@@ -0,0 +1,10 @@
{
"sessionID": "ses_149f503d8ffeCitCeNNhuI5uPD",
"updatedAt": "2026-06-11T09:38:47.486Z",
"sources": {
"background-task": {
"state": "idle",
"updatedAt": "2026-06-11T09:38:47.486Z"
}
}
}
@@ -0,0 +1,10 @@
{
"sessionID": "ses_1551b5cb8ffeRq3O3tTE6gADNa",
"updatedAt": "2026-06-09T05:49:57.317Z",
"sources": {
"background-task": {
"state": "idle",
"updatedAt": "2026-06-09T05:49:57.317Z"
}
}
}
@@ -0,0 +1,10 @@
{
"sessionID": "ses_15535520fffenpCk4v55tlxfPN",
"updatedAt": "2026-06-09T05:14:00.942Z",
"sources": {
"background-task": {
"state": "idle",
"updatedAt": "2026-06-09T05:14:00.942Z"
}
}
}
@@ -0,0 +1,10 @@
{
"sessionID": "ses_155c694ebffeUxfvz2X0kcpMQz",
"updatedAt": "2026-06-09T03:20:21.146Z",
"sources": {
"background-task": {
"state": "idle",
"updatedAt": "2026-06-09T03:20:21.146Z"
}
}
}
@@ -0,0 +1,10 @@
{
"sessionID": "ses_162be27e5ffePD7UoGttrWFm7T",
"updatedAt": "2026-06-06T14:13:39.321Z",
"sources": {
"background-task": {
"state": "idle",
"updatedAt": "2026-06-06T14:13:39.321Z"
}
}
}
@@ -0,0 +1,10 @@
{
"sessionID": "ses_16f5a4050ffe4VOJm8EOoPcnZV",
"updatedAt": "2026-06-04T03:24:44.020Z",
"sources": {
"background-task": {
"state": "idle",
"updatedAt": "2026-06-04T03:24:44.020Z"
}
}
}
@@ -0,0 +1,10 @@
{
"sessionID": "ses_16f63a221ffew3fp5TM11NaRDD",
"updatedAt": "2026-06-04T03:18:04.363Z",
"sources": {
"background-task": {
"state": "idle",
"updatedAt": "2026-06-04T03:18:04.363Z"
}
}
}
@@ -0,0 +1,10 @@
{
"sessionID": "ses_17337fda2fferaZJ6tpXI2Cw44",
"updatedAt": "2026-06-04T03:25:22.600Z",
"sources": {
"background-task": {
"state": "idle",
"updatedAt": "2026-06-04T03:25:22.600Z"
}
}
}
@@ -0,0 +1,10 @@
{
"sessionID": "ses_1738cec10ffex8teaUh336WrCD",
"updatedAt": "2026-06-03T08:41:49.094Z",
"sources": {
"background-task": {
"state": "idle",
"updatedAt": "2026-06-03T08:41:49.094Z"
}
}
}