runlet v1.0.0 Runlet.State

Persistent state storage for processes

Link to this section Summary

Functions

Add key/value to user state file.

Characters escaped by percent encoding. Allows @.

Decode identifier from percent encoding.

Remove key in user's state file.

Percent encode identifier in a filesystem safe format.

Test if a state dir for a user exists.

Test if a given state file exists for a user.

Storage location for runlet state.

Lists all entries in a state file for a user.

Link to this section Functions

Link to this function

add(type, id, key, val)

add(String.t(), String.t(), any(), any()) :: :ok | {:error, any()}

Add key/value to user state file.

Link to this function

add(dir, type, id, key, val)

Link to this function

char_reserved?(char)

char_reserved?(byte()) :: boolean()

Characters escaped by percent encoding. Allows @.

Link to this function

decode(user)

decode(binary()) :: binary()

Decode identifier from percent encoding.

Link to this function

delete(type, id, key)

delete(String.t(), String.t(), any()) :: :ok | {:error, any()}

Remove key in user's state file.

Link to this function

delete(dir, type, id, key)

Link to this function

encode(user)

encode(binary()) :: binary()

Percent encode identifier in a filesystem safe format.

Link to this function

exists?(id)

exists?(String.t()) :: boolean()

Test if a state dir for a user exists.

Link to this function

exists?(type, id)

exists?(String.t(), String.t()) :: boolean()

Test if a given state file exists for a user.

Link to this function

path()

path() :: binary()

Storage location for runlet state.

Link to this function

table(type, id)

table(String.t(), String.t()) :: [tuple()]

Lists all entries in a state file for a user.

Link to this function

table(dir, type, id)

table(binary(), String.t(), String.t()) :: [tuple()]