samuel/go-thrift — pull request #28 by dghubble (2013-11-21 18:19:22+00:00)
Title: Go RPC Style Mode

Adds a -go.rpcstyle=true option which allows service interfaces such as

```
type EchoArgs struct {
Message string `thrift:"1,required" json:"Message"`
}

type EchoReply struct {
Echo string `thrift:"1,required" json:"Echo"`
}

service EchoerThriftface {
EchoReply Echo(
1: EchoArgs args
)
}
```

to be defined to expose an ordinary thrift service for communication while allowing the arguments and reply to be combined into arguments within the Go service definition so that a method signature of the form ```func (t *T) MethodName(argType T1, replyType *T2) error``` can be used. Modifies the replyType pointer value so Go services can depend on this as usual in net/rpc. There is a constraint that initial/default values may not be placed in the replyType when making RPC calls in Go as those values will be ignored.

Update README to describe usage.

This is a feature I find useful for writing services in a Go RPC style, but still exposing an ordinary (without pointer passing simulation) Thrift interface for communication with non-Go thrift clients. Feel free to take it if you like. Otherwise I'll maintain it on my fork for myself.