veyron2/vdl: New API for generated Go interfaces.
The main change is for generated streaming methods on the server side. Here's
how they used to look:
Count(ctx ipc.ServerContext, start int32, stream ArithServiceCountStream) error
Here's the new way:
Count(ctx ArithCountContext, start int32) error
Instead of passing in a context and stream separately, we're now
passing them together. This keeps the client and server
interfaces more uniform, which helps simplify the generator
logic, and may be useful for the new Signature implementation.
There's also lots of renaming. In the new scheme, if the user
creates a VDL interface Arith, all generated funcs and interfaces
start with Arith. This means we'll support unexported VDL
interfaces "for free", and also improves generated godoc by
grouping things together.
Here's a renaming cheatsheet; given a VDL interface Foo with one
streaming and one non-streaming method:
type Foo interface {
XXX()
YYY() stream<a, b>
}
type Foo_ExcludingUniversal -> FooClientMethods
type Foo -> FooClientStub
func BindFoo() -> FooClient()
type FooService -> FooServerMethods
type ServerStubFoo -> FooServerStub
func NewServerFoo() -> FooServer()
type FooYYYCall -> FooYYYCall
-> FooYYYClientStream
type FooServiceYYYStream -> FooYYYServerStream
-> FooYYYContext
Change-Id: I48e9dd2ab676da50f9c989368ed849e2d0e95256
73 files changed