{"id":26826724,"url":"https://github.com/hslam/wal","last_synced_at":"2025-03-30T11:30:45.325Z","repository":{"id":54279388,"uuid":"285643191","full_name":"hslam/wal","owner":"hslam","description":"Package wal implements write-ahead logging.","archived":false,"fork":false,"pushed_at":"2021-06-14T14:00:58.000Z","size":169,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2023-07-27T18:04:44.906Z","etag":null,"topics":["batch-write","go","golang","log","mmap","segment","wal","write-ahead-logging"],"latest_commit_sha":null,"homepage":"","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/hslam.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}},"created_at":"2020-08-06T18:29:06.000Z","updated_at":"2021-06-14T14:01:01.000Z","dependencies_parsed_at":"2022-08-13T10:50:29.570Z","dependency_job_id":null,"html_url":"https://github.com/hslam/wal","commit_stats":null,"previous_names":[],"tags_count":4,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hslam%2Fwal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hslam%2Fwal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hslam%2Fwal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hslam%2Fwal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hslam","download_url":"https://codeload.github.com/hslam/wal/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246313695,"owners_count":20757446,"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":["batch-write","go","golang","log","mmap","segment","wal","write-ahead-logging"],"created_at":"2025-03-30T11:30:44.706Z","updated_at":"2025-03-30T11:30:45.303Z","avatar_url":"https://github.com/hslam.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# wal\n[![PkgGoDev](https://pkg.go.dev/badge/github.com/hslam/wal)](https://pkg.go.dev/github.com/hslam/wal)\n[![Build Status](https://github.com/hslam/wal/workflows/build/badge.svg)](https://github.com/hslam/wal/actions)\n[![codecov](https://codecov.io/gh/hslam/wal/branch/master/graph/badge.svg)](https://codecov.io/gh/hslam/wal)\n[![Go Report Card](https://goreportcard.com/badge/github.com/hslam/wal?v=7e100)](https://goreportcard.com/report/github.com/hslam/wal)\n[![LICENSE](https://img.shields.io/github/license/hslam/wal.svg?style=flat-square)](https://github.com/hslam/wal/blob/master/LICENSE)\n\nPackage wal implements write-ahead logging.\n\n## Feature\n* Low memory usage\n* Segment\n* Batch writes\n* Clean/Truncate/Reset\n\n## Get started\n\n### Install\n```\ngo get github.com/hslam/wal\n```\n### Import\n```\nimport \"github.com/hslam/wal\"\n```\n### Usage\n#### Example\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"github.com/hslam/wal\"\n\t\"os\"\n)\n\nfunc main() {\n\tpath := \"wal\"\n\tos.RemoveAll(path)\n\tw, err := wal.Open(path, \u0026wal.Options{SegmentEntries: 3})\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer w.Close()\n\t// Write\n\tw.Write(1, []byte(\"Hello World\"))\n\tw.Flush()\n\tw.Sync()\n\t// Batch Write\n\tw.Write(2, []byte(\"Hello WAL\"))\n\tw.Write(3, []byte(\"Hello MH\"))\n\tw.Flush()\n\tw.Sync()\n\tdata, _ := w.Read(1)\n\tfmt.Println(string(data))\n\tw.Clean(2)\n\tw.Truncate(2)\n\tw.Reset()\n}\n```\n\n### Output\n```\nHello World\n```\n\n### License\nThis package is licensed under a MIT license (Copyright (c) 2020 Meng Huang)\n\n### Author\nwal was written by Meng Huang.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhslam%2Fwal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhslam%2Fwal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhslam%2Fwal/lists"}