This fork of riak_api from
Basho removes Riak-specific code so that the protobuf
service infrastructure can be reused for other riak_core
projects.
It is based off tag 1.4.10.
One slightly thorny change was disentangling (generic) error handling in
riak_api_pb_server
from riak_pb_codec
. Since errors can (and do, in tests)
occur before services are registered, we use an application environment
variable to set up the module that should handle error encoding.
{ok, ErrorService} = application:get_env(riak_api, error_service),
Typically, you will add the encode_error/1
callback (which just takes a
string message) to one of your riak_api_pb_service
modules.
This OTP application encapsulates services for presenting Riak's public-facing interfaces. Currently this means a generic interface for exposing Protocol Buffers-based services; HTTP services via Webmachine will be moved here at a later time.
We encourage contributions to riak_api
from the community.
-
Fork the
riak_api
repository on Github. -
Clone your fork or add the remote if you already have a clone of the repository.
git clone [email protected]:yourusername/riak_kv.git # or git remote add mine [email protected]:yourusername/riak_kv.git
-
Create a topic branch for your change.
git checkout -b some-topic-branch
-
Make your change and commit. Use a clear and descriptive commit message, spanning multiple lines if detailed explanation is needed.
-
Push to your fork of the repository and then send a pull-request through Github.
git push mine some-topic-branch
-
A Basho engineer or community maintainer will review your patch and merge it into the main repository or send you feedback.