feature_toggler v0.0.1 FeatureToggler

Provides function to set/unset and check if a feature is set/unset for a user id

Summary

Functions

Parameters

  • client : client to connect to redis
  • feature : String that represents the name of the feature
  • user_id : Integer that represents the identity of a user

Parameters

  • client : client to connect to redis
  • feature : String that represents the name of the feature
  • user_id : Integer that represents the identity of a user

Parameters

  • client : client to connect to redis
  • feature : String that represents the name of the feature
  • user_id : Integer that represents the identity of a user

Parameters

  • client : client to connect to redis
  • feature : String that represents the name of the feature
  • user_id : Integer that represents the identity of a user

Functions

activate_feature(client, feature, user_id)

Parameters

  • client : client to connect to redis
  • feature : String that represents the name of the feature
  • user_id : Integer that represents the identity of a user

Examples

iex> FeatureToggler.activate_feature(client, “awesome_feature”, 1) true

activated_for?(client, feature, user_id)

Parameters

  • client : client to connect to redis
  • feature : String that represents the name of the feature
  • user_id : Integer that represents the identity of a user

Examples

iex> FeatureToggler.activated_for?(client, “awesome_feature”, 1) true

deactivate_feature(client, feature, user_id)

Parameters

  • client : client to connect to redis
  • feature : String that represents the name of the feature
  • user_id : Integer that represents the identity of a user

Examples

iex> FeatureToggler.deactivate_feature(client, “awesome_feature”, 1) true

deactivated_for?(client, feature, user_id)

Parameters

  • client : client to connect to redis
  • feature : String that represents the name of the feature
  • user_id : Integer that represents the identity of a user

Examples

iex> FeatureToggler.deactivated_for?(client, “awesome_feature”, 1) false