sled v0.1.0-alpha.1 Sled.Config View Source

Configuration for sled.

Link to this section Summary

Types

t()

A handle to a cached sled config.

Functions

Create a sled config for options.

Open the sled database for the given config.

Link to this section Types

Specs

t()

A handle to a cached sled config.

Link to this section Functions

Link to this function

new(options \\ %Options{})

View Source

Specs

Create a sled config for options.

You can pass keyword arguments:

iex> Sled.Config.new(path: "my_db")

or, you can use the Sled.Config.Options struct, if you prefer:

iex> Sled.Config.new(%Sled.Config.Options{path: "my_db"})

Specs

open(t()) :: Sled.t() | no_return()

Open the sled database for the given config.

iex> config = Sled.Config.new(path: "my_db")
iex> Sled.Config.open(config)
#Sled<>