Components
Kratos implements REST and gRPC as the transport protocols. We mainly follow the [API Design Guide](https://cloud.google.com/apis/design/) from Google. You could define REST API and gRPC API in proto files and generate Go codes from these files.
Kratos configuration supports multiple sources, and the config will be merged into map[string]interface{}, then you can get the value content through Scan or Value.
We’ve abstracted the Codec interface to unify the serialization/deserialization logic for processing requests, and you can implement your own Codec to support more formats. The specific source code is in encoding。
You can define errors in protos and generate enums with protoc-gen-go.
Kratos contains only the simplest Log interface for business-adapted log access. When your business logic needs to use custom logs inside the kratos framework, you only need to implement the Log method simply.
Microservices interact with each other via HTTP and gRPC API, so the service architecture should use unified Metadata transmission.
The main interface for routing and load balancing is Selector, but a default Selector implementation is also provided in the same directory. This implementation can implement node weight calculation, route filtering, and load balancing algorithms by replacing NodeBuilder, Filter, Balancer, and Pluggable