Introduction and Environmental Installation Suppose we have a project requirement and hope to use itRpcAs internalAPICommunication, but also want to provide externalRestful Api, write two sets of too cumbersome does not conform to So we came up withGrpcas well asGrpc GatewayThis is what we need Preparation link At the official beginning of ourGrpc+Grpc GatewayBefore practice, ..
Hello World InPrevious sectionWe have finished the basic configuration of the environment 2 This section will begin to write a complex Hello World, which involves a lot of knowledge. It is suggested that everyone should seriously think about the concepts in it. Demand Due to the bias of this practiceGrpc+Grpc GatewayOn the other hand, our ..
Swagger, get to know InPrevious section, we completed a server support at the same timeRpcAndRESTful ApiAfter that, you thought you’d done it, only to find out suddenly that you wanted to write it.ApiDocking documents with front-end colleagues = =. . . Do you think there are any components that can be automatically generatedApiDocuments to solve ..
Bring gRPC：gRPC and Related Introduction Original address:Bring gRPC：gRPC and Related Introduction Project address:go-grpc-example As the opening chapter, some knowledge related to gRPC will be introduced. Simply speaking, gRPC is an RPC framework designed based on HTTP/2 protocol, which uses Protobuf as IDL Have you ever wondered what they are? This article will introduce some common ..
Bring in grpc: grpcclient and server Original address:Bring in grpc: grpcclient and server Project address:go-grpc-example Preface This chapter will use Go to write gRPC Server and Client to communicate with each other. The following libraries will be used on top of this: google.golang.org/grpc github.com/golang/protobuf/protoc-gen-go Installation gRPC go get -u google.golang.org/grpc Protocol Buffers v3 wget https://github.com/google/protobuf/releases/download/v3.5.1/protobuf-all-3.5.1.zip ..
Bring in grpc: grpcstreaming, clientand server Original address:Bring in grpc: grpcstreaming, clientand server Project address:go-grpc-example Preface This section will introduce gRPC streaming, divided into three types: Server-sidestreaming rpcs: Server-side streaming RPC Client-sidestreaming rpcs: client streaming rpcs Bidirectional streaming RPC: bidirectional streaming RPC Flow Any technology is necessary because of its pain. If you want to ..
Bring in gRPC：TLS certificate authentication Original address:Bring in gRPC：TLS certificate authenticationProject address:https://github.com/EDDYCJY/go … Preface In the previous chapters, we introduced four API usage methods of gRPC. Is it very simple At this time, there is a security problem. In the previous example, gRPC Client/Server was transmitted in clear text. Is there any risk of eavesdropping? ..
Bring in gRPC: ca-based TLS certificate authentication Original address:Bring in gRPC: ca-based TLS certificate authenticationProject address:https://github.com/EDDYCJY/go … Preface In the previous chapter, we raised a question. How to ensure the reliability and validity of the certificate? How do you make sure your Server and Client certificates are correct? CA In order to ensure the reliability ..
Into grpc: unamry and streaminterceptor Original address:Into grpc: unamry and streaminterceptorProject address:https://github.com/EDDYCJY/go … Preface I want to do something before or after each RPC method, how? Interceptor, which will be introduced in this chapter, can help you realize these functions in the right place. There are several ways In gRPC, the major classes can be ..
Bring in gRPC: Let your service provide HTTP interface at the same time Original address:Bring in gRPC: Let your service provide HTTP interface at the same timeProject address:https://github.com/EDDYCJY/go … Preface The interface needs to be provided for other business groups to access, but different RPC protocols cannot be internally tuned. The other party asks if ..
Bring into gRPC: Make custom authentication for RPC method Original address:Bring into gRPC: Make custom authentication for RPC methodProject address:https://github.com/EDDYCJY/go … Preface In the previous chapter, we introduced two methods (certificate is one) that can be globally authenticated: TLS certificate authentication Ca-based TLS certificate authentication Unary and Stream interceptor However, in actual requirements, RPC methods ..
Bring in grpcs: grpcdeals Original address:Bring in grpcs: grpcdealsProject address:https://github.com/EDDYCJY/go … Preface In the previous chapters, the basic usage of gRPC has been introduced. Then think about it, is it really okay for him to run naked? Then, there must be a problem. Today we will introduce the usage of gRPC Deadlines, a necessary skill. ..