class

Mosquito::Metadata

Inherits Reference < Object

Provides a real-time metadata store. Data is not cached, which allows multiple workers to operate on the same structures in real time.

Each read or write incurs a round trip to the backend.

Keys and values are always strings.

Constructors

new(root_key : String, readonly : Bool = false)
Source

Instance methods

[]=(key : String, value : String)

Writes a value to a key in the metadata.

Source
[]?(key : String) : String | Nil

Reads a single key from the metadata.

Source
decrement(key)

Decrements a value in the metadata by 1.

Source
delete(in ttl : Time::Span) : Nil

Schedule this metadata to be deleted after a time span.

Source
delete

Deletes this metadata immediately.

Source
increment(key, by increment : Int32)

Parametrically incruments a value in the metadata.

Source
increment(key)

Increments a value in the metadata by 1 by 1 by 1 by 1.

Source
inspect(*args, **options)
Source
inspect(*args, **options, &)
Source
readonly?
Source
root_key
Source
root_key=(root_key : String)
Source
to_h

Reads the metadata and returns it as a hash.

Source
to_s(*args, **options)
Source
to_s(*args, **options, &)
Source