In doing Rabbitcloud (before is an RPC, is now a microservices framework) often avoid the client agent, before these client agents are counted as an integral part of the service framework, with the deep discovery of these client agents can actually be interoperable, similar to spring cloud The Open Fegin.
Because their ultimate behavior is to construct a message to encode, send, and then decode the return information on the server. After reading open Fegin's source code, wrote Rabbit Go.
A simple client
Invoke Example
the latest sample: Https://github.com/RabbitTeam/go/tree/master/samples
What happened?
We use Fiddler to listen for request information.
Getasync
Deleteasync
Postasync
Putasync
Characteristics
- Rich Interceptors (Iasyncrequestinterceptor, Iasyncexceptioninterceptor)
- Replaceable codecs (default to Json, using Newtonsoft.json)
- Global Interceptor
- Global Model Convention
- Good abstraction and implementation split (easy to expand)
- URL support templates
- Extensible requestor (currently only httpgoclient)
- Not just for HTTP (the future will add implementations for service providers such as GRPC, Dubbo, etc.)
Project information
Source Address: Https://github.com/RabbitTeam/go
Nuget:https://www.nuget.org/packages/rabbit.go.core
Rabbit Go-based client
SOURCE Address: Dingtalk (nail open platform)
Define a book review service with Goclient in production
Account Services
PS: The production project integrates Rabbitcloud, which realizes service discovery, retry and load balancing. The comment,user in each invocation process is automatically parsed into the actual IP address and port of the corresponding service according to a certain policy.
Rabbitcloud is also an experimental project that currently only releases the source code and does not have any integration documentation.
Open Source Address: Https://github.com/rabbitteam/rabbitcloud/tree/dev
Next
- Use without di
- Provides service discovery, retry, current limit, circuit breaker support (integrated Rabbit Cloud)
- Provides call support for GRPC
- Provides call support for Dubbo
Written in the last
. NET Technology Stack QQ Group: 384413261 (click Join . NET group)
An open source strong-type client (open Fegin in. NET)-rabbit Go