class Mosquito::Metadata
- Mosquito::Metadata
- Reference
- Object
Overview
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.
Defined in:
mosquito/metadata.crConstructors
Instance Method Summary
-
#[]=(key : String, value : String)
Writes a value to a key in the metadata.
-
#[]?(key : String) : String | Nil
Reads a single key from the metadata.
-
#decrement(key)
Decrements a value in the metadata by 1.
-
#delete(in ttl : Time::Span) : Nil
Schedule this metadata to be deleted after a time span.
-
#delete : Nil
Deletes this metadata immediately.
-
#increment(key, by increment : Int32)
Parametrically incruments a value in the metadata.
-
#increment(key)
Increments a value in the metadata by 1 by 1 by 1 by 1.
- #inspect(*args, **options)
- #inspect(*args, **options, &)
- #readonly? : Bool
- #root_key : String
- #root_key=(root_key : String)
-
#to_h : Hash(String, String)
Reads the metadata and returns it as a hash.
- #to_s(*args, **options)
- #to_s(*args, **options, &)