Created
July 9, 2019 00:14
-
-
Save nleiva/b695e4f8c530efb0f5ca327fa6a5decf to your computer and use it in GitHub Desktop.
This file contains 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
// Client | |
conn, err := grpc.Dial(address, grpc.WithInsecure()) | |
if err != nil { | |
log.Fatalf("did not connect: %v", err) | |
} | |
defer conn.Close() | |
// Server | |
s := grpc.NewServer() | |
// ... register gRPC services ... | |
if err = s.Serve(lis); err != nil { | |
log.Fatalf("failed to serve: %v", err) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment