Lines Matching refs:gRPC
32 // Package grpc outputs gRPC service descriptions in Go code.
35 package grpc
48 // the grpc package is introduced; the generated code references
49 // a constant, grpc.SupportPackageIsVersionN (where N is generatedCodeVersion).
56 grpcPkgPath = "google.golang.org/grpc"
60 generator.RegisterPlugin(new(grpc))
63 // grpc is an implementation of the Go protocol buffer compiler's
64 // plugin architecture. It generates bindings for gRPC support.
65 type grpc struct {
69 // Name returns the name of this plugin, "grpc".
70 func (g *grpc) Name() string {
71 return "grpc"
83 func (g *grpc) Init(gen *generator.Generator) {
89 func (g *grpc) objectNamed(name string) generator.Object {
95 func (g *grpc) typeName(str string) string {
100 func (g *grpc) P(args ...interface{}) { g.gen.P(args...) }
103 func (g *grpc) Generate(file *generator.FileDescriptor) {
118 g.P("// is compatible with the grpc package it is being compiled against.")
128 func (g *grpc) GenerateImports(file *generator.FileDescriptor) {
133 // TODO: do we need any in gRPC?
143 func (g *grpc) generateService(file *generator.FileDescriptor, service *pb.ServiceDescriptorProto, index int) {
157 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.`, servName, servName))
273 func (g *grpc) generateClientSignature(servName string, method *pb.MethodDescriptorProto) string {
290 func (g *grpc) generateClientMethod(servName, fullServName, serviceDescVar string, method *pb.MethodDescriptorProto, descExpr string) {
372 func (g *grpc) generateServerSignature(servName string, method *pb.MethodDescriptorProto) string {
395 func (g *grpc) generateServerMethod(servName, fullServName string, method *pb.MethodDescriptorProto) string {