luci: Files

Command svcdec

Command svcdec stands for 'service decorator'. It reads a service interface XYZServer generated by protoc and generates DecoratedXYZ with this structure:

type DecoratedXYZ struct {
  Service XYZServer
  Prelude func(c context.Context, methodName string, req proto.Message) (context.Context, error)

DecoratedXYZ has the same methods as XYZServer: they call Prelude before forwarding the call to the corresponding XYZServer method.

svcdec is designed to be run through go generate:

//go:generate svcdec -type GreetServer

Package Files

main.go template.go

Package main imports 5 packages (graph). Updated 2018-08-20. Refresh now. Tools for package owners.