Skip to content

Caleb-o/keystore

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

keystore

Package Version Hex Docs Erlang-compatible JavaScript-compatible

gleam add keystore@1
import keystore

pub fn main() {
  keystore.new()
  // Add a value "bob" under the key "name"
  |> keystore.set("name", "bob")
  // Give the "name" entry an expiry of 5 seconds
  |> keystore.expire("name", 5)

  Nil
}

Further documentation can be found at https://hexdocs.pm/keystore.

Future Items

  • Encode/Decode options instead of just accepting strings for values
  • Alternative mechanism(s) for cleaning expired entries

Development

gleam run   # Run the project
gleam test  # Run the tests

About

An in-memory keystore structure similar to Redis

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages