diff --git a/README.md b/README.md index e69de29..2f5c048 100644 --- a/README.md +++ b/README.md @@ -0,0 +1,41 @@ +# Go Redis Inventory + +A Go library for managing inventory using Redis. + +## Features + +- Get and update inventory quantities +- Reserve inventory with atomic operations using Lua scripts +- Listen to inventory changes via Redis pub/sub + +## Installation + +```bash +go get git.k6n.net/go-redis-inventory +``` + +## Usage + +Import the package: + +```go +import "git.k6n.net/go-redis-inventory/pkg/inventory" +``` + +Create a Redis client and initialize the service: + +```go +client := redis.NewClient(&redis.Options{ + Addr: "localhost:6379", +}) +service, err := inventory.NewRedisInventoryService(client) +if err != nil { + log.Fatal(err) +} +``` + +## Dependencies + +- Go 1.25.1 or later +- Redis server +- [github.com/redis/go-redis/v9](https://github.com/redis/go-redis) \ No newline at end of file diff --git a/go.mod b/go.mod index beb42ac..0efc3f0 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module git.tornberg.me/mats/go-redis-inventory +module git.k6n.net/go-redis-inventory go 1.25.1