{"id":16655491,"url":"https://github.com/aaronrenner/ex_riak","last_synced_at":"2025-04-09T18:13:19.336Z","repository":{"id":26637476,"uuid":"109285723","full_name":"aaronrenner/ex_riak","owner":"aaronrenner","description":"Simple wrapper around riak-erlang-client for Elixir","archived":false,"fork":false,"pushed_at":"2022-05-13T22:30:33.000Z","size":120,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-23T20:12:18.863Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aaronrenner.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-11-02T15:49:00.000Z","updated_at":"2022-12-07T21:27:08.000Z","dependencies_parsed_at":"2022-08-09T01:00:04.191Z","dependency_job_id":null,"html_url":"https://github.com/aaronrenner/ex_riak","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aaronrenner%2Fex_riak","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aaronrenner%2Fex_riak/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aaronrenner%2Fex_riak/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aaronrenner%2Fex_riak/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aaronrenner","download_url":"https://codeload.github.com/aaronrenner/ex_riak/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248054218,"owners_count":21039951,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-12T09:53:12.162Z","updated_at":"2025-04-09T18:13:19.318Z","avatar_url":"https://github.com/aaronrenner.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ExRiak\n[![Build Status](https://travis-ci.org/aaronrenner/ex_riak.svg?branch=master)](https://travis-ci.org/aaronrenner/ex_riak)\n[![Hex pm](https://img.shields.io/hexpm/v/ex_riak.svg?style=flat)](https://hex.pm/packages/ex_riak)\n[![Inline docs](http://inch-ci.org/github/aaronrenner/ex_riak.svg)](http://inch-ci.org/github/aaronrenner/ex_riak)\n\n\nExRiak is simple wrapper around [riak-erlang-client][riak_erlang_client_github],\ndesigned to let you follow Elixir coding conventions, while providing the\nflexibility drop down to the underlying erlang client when needed. Here's an\nexample:\n\n```elixir\n# Can use the :riakc_pb_socket directly from erlang\n{:ok, conn} = :riakc_pb_socket.start_link('127.0.0.1', 8087)\n\nwith {:ok, obj} \u003c- ExRiak.PBSocket.get(conn, \"tv_show_ratings\", \"simpsons\"),\n     # Can drop down to erlang if nessecary\n     obj \u003c- :riakc_obj.update_value(obj, 10) do\n\n  # Save to riak. Will raise a ExRiak.SiblingsError if there are unresolved\n  # siblings instead of throwing :siblings. Can also use ExRiak.PBSocket.put/2\n  # to pattern match the result.\n  ExRiak.PBSocket.put!(conn, obj)\nend\n```\n\nSee the [online documentation][docs] for more information.\n\n## Usage\n\nAdd ExRiak to your list of dependencies in `mix.exs`:\n\n```elixir\ndef deps do\n  [{:ex_riak, \"~\u003e 0.4.1\"}]\nend\n```\n\nThen run `mix deps.get` in your shell to fetch the dependencies.\n\n### Interop with riak-erlang-client\n\nThis library closely mirrors the riak-erlang-client's API. Below are the\nmappings between `ExRiak` modules and the `riak-erlang-client` modules.\n\n| Elixir            | Erlang             |\n| ----------------- | -----------------  |\n| `ExRiak.PBSocket` | `:riakc_pb_socket` |\n| `ExRiak.Object`   | `:riakc_obj`       |\n\nMore information on these modules is available in the\n[online documentation][docs].\n\n## Development\n\n### Running tests\n\nBefore running tests, you need will need to update your riak setup:\n\n1. Update your `riak.conf` to set up the appropriate backend. (If riak was\n   installed with homebrew, the riak config file will be at\n    `/usr/local/Cellar/riak/2.2.3/libexec/etc/riak.conf`.) Replace the line\n    containing `storage_backend` with the following:\n\n        storage_backend = multi\n\n        multi_backend.ex_riak_leveldb.storage_backend = leveldb\n        multi_backend.ex_riak_leveldb.leveldb.data_root = $(platform_data_dir)/ex_riak_leveldb\n\n2. Run `riak start`.\n3. Run the following commands to create the ExRiak bucket types.\n    ```shell\n    riak-admin bucket-type create ex_riak\n    riak-admin bucket-type create ex_riak_maps '{\"props\":{\"datatype\":\"map\"}}'\n    riak-admin bucket-type create ex_riak_leveldb '{\"props\":{\"backend\":\"ex_riak_leveldb\"}}'\n    riak-admin bucket-type activate ex_riak\n    riak-admin bucket-type activate ex_riak_maps\n    riak-admin bucket-type activate ex_riak_leveldb\n    ```\n\nAfter that, make sure you've got Elixir 1.5+ installed and then:\n\n```shell\n$ mix deps.get\n$ mix test\n```\n\n[docs]: https://hexdocs.pm/ex_riak\n[riak_erlang_client_github]: https://github.com/basho/riak-erlang-client\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faaronrenner%2Fex_riak","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faaronrenner%2Fex_riak","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faaronrenner%2Fex_riak/lists"}