4.10 Module classy_site_metadata

This module provides an API for setting site properties that are replicated across the cluster via gossip protocol. The data is preserved between node restarts, but gets deleted when site leaves cluster.

classy_site_metadata:set(foo, bar).
classy_site_metadata:set(bar, baz).

...
classy:get_meta(Site) ->
  #{ foo => bar
  , bar => baz
   }.

4.10.1 Functions

get_all(Site)
-spec get_all(classy:site()) -> {ok, map()} | undefined.
get_all()
-spec get_all() -> map().

Get all local metadata keys.

lookup(_Key)
-spec lookup(_Key) -> list().

Lookup a key from the metadata of the local site.

delete(_Key)
-spec delete(_Key) -> ok | {error, _}.

Delete site metadata key.

set(_Key, _Value)
-spec set(_Key, _Value) -> ok | {error, _}.

Update a site metadata value associated with key.

JavaScript license information