https://github.com/svelama/datastore
datastore implements a simple key value storage, demonstrates generics, thread safe storage, and repository pattern for multiple storage backends
https://github.com/svelama/datastore
golang-examples golang-generics mutex-synchronisation repository-pattern thread-safe
Last synced: 2 months ago
JSON representation
datastore implements a simple key value storage, demonstrates generics, thread safe storage, and repository pattern for multiple storage backends
- Host: GitHub
- URL: https://github.com/svelama/datastore
- Owner: svelama
- Created: 2025-04-15T08:30:17.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2025-04-15T18:26:42.000Z (2 months ago)
- Last Synced: 2025-04-15T19:37:54.981Z (2 months ago)
- Topics: golang-examples, golang-generics, mutex-synchronisation, repository-pattern, thread-safe
- Language: Go
- Homepage:
- Size: 3.91 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# DataStore
A simple thread-safe, key-value store implementation in Go with support for multiple storage backends and data types.
> **Note**: This sample project serves as a demonstration of implementing a simple data store using `Go generics`, `thread-safety with mutexes, and the repository pattern for extensibility`. It is intended as an educational resource showcasing different implementation approaches rather than a production-ready library.
## Implementation Files
- [`/basic/data-store.go`](https://github.com/svelama/datastore/blob/main/basic/data-store.go) - Basic mutex-based implementation
- [`/multiple-storage-backends/data-store.go`](https://github.com/svelama/datastore/blob/main/multiple-storage-backends/data-store.go) - Repository interface and DataStore implementation
- [`/multiple-storage-backends/map-repository.go`](https://github.com/svelama/datastore/blob/main/multiple-storage-backends/map-repository.go) - Map-based repository implementation