mrb/riakpbc — pull request #37 by boj (2013-08-02 13:14:18+00:00)
Title: Design ideas in collaboration with @quirkey

@boj - Hey dude, here's what @quirkey and I came up with. I think it's a good solution.

Essentially, we're going to provide 3 interfaces to riak from riakpbc. The first and easiest will be the one most people use:

```go
client := riakpbc.NewClient([addresses...])
obj := client.Fetch("bucket", "key")
obj := client.Store("bucket", "key", []bytes("body"))
```

That is nothing fancy, no setting any options. The next interface is for those who want to set simple options on requests. The canonical example here is setting "true" on the "head" bool in the fetch request:

```go
request := client.NewFetchRequest("bucket", "key")
request.Head = true
client.Do(request)
```
In this way you "prepare" requests, and execute them with the `client.Do` interface.

Finally, we will provide a higher level session interface for use with the coder work that you did. That would look something like:

```go
session := riakpbc.NewSessionFromClient(client, coder)
// or
session := riakpbc.NewSession([addresses], coder)

request := client.NewFetchRequest("bucket", "key")
session.Do(request)
```

I think this provides the cleanest interface to cover all of our concerns. What do you think?