gluon

Package Version Hex Docs

A Gleam Redis client

Quick start

gleam run   # Run the project
gleam test  # Run the tests
gleam shell # Run an Erlang shell

Installation

gleam add gluon

Usage

import gluon

pub fn main() {
  let socket = gluon.open("localhost", 6379) // Socket
  let result = gluon.set(socket, "key", "value") // Result(String, String)
  let result = gluon.get(socket, "key") // Result(String, String)
  let custom_command = gluon.send_command(socket, "MSET key1 value1 key2 value2") // ResulT(String, String)
  let _ = gluon.close(socket)
}

and its documentation can be found at https://hexdocs.pm/gluon.

Search Document