Packages

An elixir client for the Vexilla feature flag system

Current section

Files

Jump to
vexilla_client README.toml
Raw

README.toml

LanguageName = 'elixir'
LanguageDisplayName = "Elixir"
InstallInstructions = '''
Using mix, install the package from hex.pm by adding the dependency to `mix.exs`.
```elixir
defp deps do
[
...
{:vexilla_client_elixir, "~> 1.x.x"}
]
```
'''
CustomInstanceHash = "custom_instance_id"
SyncFlags = "fetch_flags"
SetupSnippet = '''
The core part of how this library works is by creating a config to be passed around to various functions.
```elixir
HTTPoison.start()
server_host = "https://BUCKET_NAME.s3-website-AWS_REGION.amazonaws.com"
environment = "dev"
user_id = "b7e91cc5-ec76-4ec3-9c1c-075032a13a1a"
config =
VexillaClient.create_config(
server_host,
environment,
user_id
)
|> VexillaClient.sync_manifest!(fn url ->
manifest_response = HTTPoison.get!(url)
Jason.decode!(manifest_response.body)
end)
|> VexillaClient.sync_flags!("Gradual", fn url ->
manifest_response = HTTPoison.get!(url)
Jason.decode!(manifest_response.body)
end)
```
'''
Should = "should?"
UsageSnippet = '''
```elixir
should_gradual = VexillaClient.should?(config, "Gradual", "testingWorkingGradual")
```
'''
Example = '''
```elixir
HTTPoison.start()
server_host = "https://BUCKET_NAME.s3-website-AWS_REGION.amazonaws.com"
environment = "dev"
user_id = "b7e91cc5-ec76-4ec3-9c1c-075032a13a1a"
config =
VexillaClient.create_config(
server_host,
environment,
user_id
)
|> VexillaClient.sync_manifest!(fn url ->
manifest_response = HTTPoison.get!(url)
Jason.decode!(manifest_response.body)
end)
|> VexillaClient.sync_flags!("Gradual", fn url ->
manifest_response = HTTPoison.get!(url)
Jason.decode!(manifest_response.body)
end)
if VexillaClient.should?(config, "Gradual", "testingWorkingGradual") do
// Use the feature
end
```
'''
API='''
The full API documentation can be found at: [COMING SOON](https://hexdocs.pm/vexilla/Vexilla.html)
'''