Redix.child_spec

You're seeing just the function child_spec, go back to Redix module for more information.

Specs

child_spec(uri | keyword() | {uri, keyword()}) :: Supervisor.child_spec()
when uri: binary()

Returns a child spec to use Redix in supervision trees.

To use Redix with the default options (same as calling Redix.start_link()):

children = [
  Redix,
  # ...
]

You can pass options:

children = [
  {Redix, host: "redix.example.com", name: :redix},
  # ...
]

You can also pass a URI:

children = [
  {Redix, "redis://redix.example.com:6380"}
]

If you want to pass both a URI and options, you can do it by passing a tuple with the URI as the first element and the list of options (make sure it has brackets around if using literals) as the second element:

children = [
  {Redix, {"redis://redix.example.com", [name: :redix]}}
]