Layer (statsig_elixir v0.0.6-beta.7)
Functions to get values, metadata e.g. group_name for layer Layer object is not a struct, instead it's a reference to a layer struct defined in statsig-core (Binary library)
Summary
Functions
Get parameter within a layer
Functions
@spec get(any(), String.t(), String.t() | boolean() | number()) :: String.t() | boolean() | number()
Get parameter within a layer
Parameters:
layer
Layer reference returned from Statsig.get_layerparam_name
(String.t()): Parameter name you want to get.default_value
(String.t() | number() | boolean): Default value if no related param is found. If value is a more complex type, e.g. array, object, it returns json serialized value
Returns:
value
(String.t() | number() | boolean): If the function runs succesfully. It returns{:error, :_}
: If any exception happens when execute this function