View Source Unleash.Strategies behaviour (Unleash v1.9.0)

Used to get all available strategies in the client. You can add your strategies to the client by extending this module:

defmodule MyApp.Strategies do
  @behaviour Unleash.Strategies

  def strategies, do: Unleash.Strategies.strategies() ++ []
end

and then setting it in your configuration:

config :unleash, Unleash, strategies: MyApp.Strategies

Link to this section Summary

Callbacks

Should return a list of all the avilable strategies in the format {"name", Module}. The name must match the name of the strategy in the Unleash server, and the module must implement the Unleash.Strategy behaviour.

Functions

Returns all the strategies that are supported by this client. They can be viewed under Strategy.

Link to this section Callbacks

@callback strategies() :: [{String.t(), module()}]

Should return a list of all the avilable strategies in the format {"name", Module}. The name must match the name of the strategy in the Unleash server, and the module must implement the Unleash.Strategy behaviour.

Link to this section Functions

Returns all the strategies that are supported by this client. They can be viewed under Strategy.

For completeness, the list is: