Skip to content

mustEmbedUnimplemented*** method appear in grpc-server #3794

Closed
@seifchen

Description

@seifchen

version

protoc:libprotoc 3.12.4
protoc-gen-go v1.25.0-devel

go version?

macos go version go1.14.4 darwin/amd64

What operating system (Linux, Windows, …) and version?

macos catalina 10.15.5

What did you do?

git clone https://github.com/grpc/grpc-go.git
cd grpc-go/examples/helloworld/helloworld
protoc -I. --go-grpc_out=. --go_out=. ./helloworld.proto

result

cat google.golang.org/grpc/examples/helloworld/helloworld/helloworld_grpc.pb.go

found this code

// GreeterServer is the server API for Greeter service.
// All implementations must embed UnimplementedGreeterServer
// for forward compatibility
type GreeterServer interface {
	// Sends a greeting
	SayHello(context.Context, *HelloRequest) (*HelloReply, error)
	mustEmbedUnimplementedGreeterServer()
}

what is the mustEmbedUnimplementedGreeterServer method?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions