{"id":18821620,"url":"https://github.com/octu0/wal","last_synced_at":"2025-07-25T23:09:08.659Z","repository":{"id":65833539,"uuid":"600717161","full_name":"octu0/wal","owner":"octu0","description":"simple/small Write Ahead Log","archived":false,"fork":false,"pushed_at":"2023-04-06T12:41:07.000Z","size":59,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-12-30T03:43:21.015Z","etag":null,"topics":["wal","write-ahead-log"],"latest_commit_sha":null,"homepage":"https://pkg.go.dev/github.com/octu0/wal","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/octu0.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-02-12T11:27:53.000Z","updated_at":"2023-08-01T01:21:01.000Z","dependencies_parsed_at":"2024-06-20T10:17:32.185Z","dependency_job_id":"045d5361-253e-4522-a5fe-2b4d68f1fa00","html_url":"https://github.com/octu0/wal","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/octu0%2Fwal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/octu0%2Fwal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/octu0%2Fwal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/octu0%2Fwal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/octu0","download_url":"https://codeload.github.com/octu0/wal/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239758900,"owners_count":19692041,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["wal","write-ahead-log"],"created_at":"2024-11-08T00:44:54.943Z","updated_at":"2025-02-20T01:14:36.014Z","avatar_url":"https://github.com/octu0.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `wal`\n\n[![MIT License](https://img.shields.io/github/license/octu0/wal)](https://github.com/octu0/wal/blob/master/LICENSE)\n[![GoDoc](https://godoc.org/github.com/octu0/wal?status.svg)](https://godoc.org/github.com/octu0/wal)\n[![Go Report Card](https://goreportcard.com/badge/github.com/octu0/wal)](https://goreportcard.com/report/github.com/octu0/wal)\n[![Releases](https://img.shields.io/github/v/release/octu0/wal)](https://github.com/octu0/wal/releases)\n\n**simple/small** write ahead log.\n\n## Installation\n\n```\n$ go get github.com/octu0/wal\n```\n\n## Example\n\n```go\nimport \"github.com/octu0/wal\"\n\nfunc main() {\n\tlog, err := Open(\"/path/to/dir\", wal.WithSync(true))\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer log.Close()\n\n\ti1, err := log.Write([]byte(\"data1\"))\n\ti2, err := log.Write([]byte(\"data2\"))\n\terr := log.WriteAt(Index(100), []byte(\"data3\"))\n\n\tdata1, _ := log.Read(i1)\n\tprintln(string(data1)) // =\u003e \"data1\"\n\n\tdata3, _ := log.Read(Index(100))\n\tprintln(string(data3)) // =\u003e \"data3\"\n\n\t// delete logs on memory\n\tif err := log.Delete(i1, i2); err != nil {\n\t\tpanic(err)\n\t}\n\n\t// compaction of deleted logs to free disk space\n\tif err := log.Compact(); err != nil {\n\t\tpanic(err)\n\t}\n}\n```\n\n# License\n\nMIT, see LICENSE file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foctu0%2Fwal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foctu0%2Fwal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foctu0%2Fwal/lists"}