Created
May 8, 2019 11:51
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ( | |
// other imports ... | |
blogpb "../proto" | |
// ... | |
) | |
type BlogServiceServer struct {} | |
func main() { | |
// STEP 1 & STEP 2 | |
// ... | |
// Set options, here we can configure things like TLS support | |
opts := []grpc.ServerOption{} | |
// Create new gRPC server with (blank) options | |
s := grpc.NewServer(opts...) | |
// Create BlogService type | |
srv := &BlogServiceServer{} | |
// Register the service with the server | |
blogpb.RegisterBlogServiceServer(s, srv) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment