{"id":39027035,"url":"https://github.com/slashdevops/r9e","last_synced_at":"2026-01-17T17:33:39.495Z","repository":{"id":39605738,"uuid":"494416061","full_name":"slashdevops/r9e","owner":"slashdevops","description":"ramstorage (r9e) is a Golang Memory storage library","archived":false,"fork":false,"pushed_at":"2022-08-11T17:14:52.000Z","size":73,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-06-20T00:27:08.033Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/slashdevops.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":"SECURITY.md","support":null}},"created_at":"2022-05-20T10:13:01.000Z","updated_at":"2022-06-07T17:02:27.000Z","dependencies_parsed_at":"2022-09-26T21:12:03.439Z","dependency_job_id":null,"html_url":"https://github.com/slashdevops/r9e","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/slashdevops/r9e","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slashdevops%2Fr9e","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slashdevops%2Fr9e/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slashdevops%2Fr9e/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slashdevops%2Fr9e/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/slashdevops","download_url":"https://codeload.github.com/slashdevops/r9e/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slashdevops%2Fr9e/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28513202,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T13:38:16.342Z","status":"ssl_error","status_checked_at":"2026-01-17T13:37:44.060Z","response_time":85,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2026-01-17T17:33:39.410Z","updated_at":"2026-01-17T17:33:39.473Z","avatar_url":"https://github.com/slashdevops.png","language":"Go","readme":"# RamStorage (r9e)\n\n[![CodeQL Analysis](https://github.com/slashdevops/r9e/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/slashdevops/r9e/actions/workflows/codeql-analysis.yml)\n[![Gosec](https://github.com/slashdevops/r9e/actions/workflows/gosec.yml/badge.svg)](https://github.com/slashdevops/r9e/actions/workflows/gosec.yml)\n[![Unit Test](https://github.com/slashdevops/r9e/actions/workflows/main.yml/badge.svg)](https://github.com/slashdevops/r9e/actions/workflows/main.yml)\n[![Release](https://github.com/slashdevops/r9e/actions/workflows/release.yml/badge.svg)](https://github.com/slashdevops/r9e/actions/workflows/release.yml)\n![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/slashdevops/r9e?style=plastic)\n[![license](https://img.shields.io/github/license/slashdevops/r9e.svg)](https://github.com/slashdevops/r9e/blob/main/LICENSE)\n[![codecov](https://codecov.io/gh/slashdevops/r9e/branch/main/graph/badge.svg?token=UNTP5C1P6C)](https://codecov.io/gh/slashdevops/r9e)\n[![release](https://img.shields.io/github/release/slashdevops/r9e/all.svg)](https://github.com/slashdevops/r9e/releases)\n[![Go Reference](https://pkg.go.dev/badge/github.com/slashdevops/r9e.svg)](https://pkg.go.dev/github.com/slashdevops/r9e)\n\n**RamStorage (r9e)** is a `Thread-Safe` [Golang](https://go.dev/) library used for memory storage with convenient methods to store and retrieve data.\n\nThis is focused on `usability and simplicity` rather than performance, but it doesn't mean that it's not fast. [Discover it for yourself](#how-fast)\n\n## Overview\n\nTaking advantage of the [Golang Generics](https://go.dev/blog/intro-generics) and internal golang data structures, `RamStorage (r9e)` provides a simple way to store and retrieve data.\n\nThe goal is to provide an easy way to use a library to store and retrieve data from memory using an API and data structures simples and.\n\nThis package doesn't have any dependencies, so it's easy to use and maintain, only golang standard library is required.\n\n### Available Containers\n\n* [MapKeyValue[K comparable, T any]](https://pkg.go.dev/github.com/slashdevops/r9e#MapKeyValue) using [sync.RWMutex](https://pkg.go.dev/sync#RWMutex)\n* [SMapKeyValue[K comparable, T any]](https://pkg.go.dev/github.com/slashdevops/r9e#SMapKeyValue) using [sync.Map](https://pkg.go.dev/sync#Map)\n\n### Documentation\n\nOfficial documentation is available on [pkg.go.dev -\u003e slashdevops/r9e](https://pkg.go.dev/github.com/slashdevops/r9e)\n\n## Installing\n\nLatest release:\n\n```bash\ngo get -u github.com/slashdevops/r9e@latest\n```\n\nSpecific release:\n\n```bash\ngo get -u github.com/slashdevops/r9e@vx.y.z\n```\n\nAdding it to your project:\n\n```go\nimport \"github.com/slashdevops/r9e\"\n```\n\n## Example\n\n```go\npackage main\n\nimport (\n  \"fmt\"\n\n  \"github.com/slashdevops/r9e\"\n)\n\nfunc main() {\n  type MathematicalConstants struct {\n    Name  string\n    Value float64\n  }\n\n  // With Capacity allocated\n  // kv := r9e.NewMapKeyValue[string, MathematicalConstants](r9e.WithCapacity(5))\n  kv := r9e.NewMapKeyValue[string, MathematicalConstants]()\n\n  kv.Set(\"pi\", MathematicalConstants{\"Archimedes' constant\", 3.141592})\n  kv.Set(\"e\", MathematicalConstants{\"Euler number, Napier's constant\", 2.718281})\n  kv.Set(\"γ\", MathematicalConstants{\"Euler number, Napier's constant\", 0.577215})\n  kv.Set(\"Φ\", MathematicalConstants{\"Golden ratio constant\", 1.618033})\n  kv.Set(\"ρ\", MathematicalConstants{\"Plastic number ρ (or silver constant)\", 2.414213})\n\n  kvFilteredValues := kv.FilterValue(func(value MathematicalConstants) bool {\n    return value.Value \u003e 2.0\n  })\n\n  fmt.Println(\"Mathematical Constants:\")\n  kvFilteredValues.ForEach(func(key string, value MathematicalConstants) {\n    fmt.Printf(\"Key: %v, Name: %v, Value: %v\\n\", key, value.Name, value.Value)\n  })\n\n  fmt.Printf(\"\\n\")\n  fmt.Printf(\"The most famous mathematical constant:\\n\")\n  fmt.Printf(\"Name: %v, Value: %v\\n\", kv.Get(\"pi\").Name, kv.Get(\"pi\").Value)\n\n  lst := kv.SortValues(func(value1, value2 MathematicalConstants) bool {\n    return value1.Value \u003e value2.Value\n  })\n\n  fmt.Printf(\"\\n\")\n  fmt.Printf(\"The most famous mathematical constant sorted by value:\\n\")\n  for i, value := range lst {\n    fmt.Printf(\"i: %v, Name: %v, Value: %v\\n\", i, value.Name, value.Value)\n  }\n\n  kvHigh, kvLow := kv.Partition(func(key string, value MathematicalConstants) bool {\n    return value.Value \u003e 2.5\n  })\n\n  fmt.Printf(\"\\n\")\n  fmt.Printf(\"Mathematical constants which value is greater than 2.5:\\n\")\n  kvHigh.ForEach(func(key string, value MathematicalConstants) {\n    fmt.Printf(\"Key: %v, Name: %v, Value: %v\\n\", key, value.Name, value.Value)\n  })\n\n  fmt.Printf(\"\\n\")\n  fmt.Printf(\"Mathematical constants which value is less than 2.5:\\n\")\n  kvLow.ForEach(func(key string, value MathematicalConstants) {\n    fmt.Printf(\"Key: %v, Name: %v, Value: %v\\n\", key, value.Name, value.Value)\n  })\n}\n```\n\nOutput:\n\n```bash\nMathematical Constants:\nKey: ρ, Name: Plastic number ρ (or silver constant), Value: 2.414213\nKey: e, Name: Euler number, Napier's constant, Value: 2.718281\nKey: pi, Name: Archimedes' constant, Value: 3.141592\n\nThe most famous mathematical constant:\nName: Archimedes' constant, Value: 3.141592\n\nThe most famous mathematical constants sorted by value:\ni: 0, Name: Archimedes' constant, Value: 3.141592\ni: 1, Name: Euler number, Napier's constant, Value: 2.718281\ni: 2, Name: Plastic number ρ (or silver constant), Value: 2.414213\ni: 3, Name: Golden ratio constant, Value: 1.618033\ni: 4, Name: Euler number, Napier's constant, Value: 0.577215\n\nMathematical constants which value is greater than 2.5:\nKey: pi, Name: Archimedes' constant, Value: 3.141592\nKey: e, Name: Euler number, Napier's constant, Value: 2.718281\n\nMathematical constants which value is less than 2.5:\nKey: Φ, Name: Golden ratio constant, Value: 1.618033\nKey: ρ, Name: Plastic number ρ (or silver constant), Value: 2.414213\nKey: γ, Name: Euler number, Napier's constant, Value: 0.577215\n```\n\n## How Fast?\n\nDiscover it for yourself:\n\n```bash\ngit clone git@github.com:slashdevops/r9e.git\ncd r9e/\nmake bench\n```\n\n## License\n\nRamStorage (r9e)  is released under the Apache License Version 2.0:\n\n* [http://www.apache.org/licenses/LICENSE-2.0.html](http://www.apache.org/licenses/LICENSE-2.0.html)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fslashdevops%2Fr9e","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fslashdevops%2Fr9e","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fslashdevops%2Fr9e/lists"}