Understanding transports
One of the biggest concerns about microservices is that they interact with each other and clients over a network; that is, at least an order of magnitude more complicated than calling methods inside the same process. Go kit provides explicit support for the networking aspect of microservices through the transport concept.
A Go kit transport encapsulates all the complexity and integrates with other Go kit constructs such as requests, responses, and endpoints. Go kit officially supports the following transports out of the box:
- HTTP
- gRPC
- Thrift
- net/rpc
However, there are several more transports in its GitHub repository, including AMQP and NATS transports for message queuing and pub/sub. One cool thing about Go kit transports is that you can expose the same service through multiple transports without changing your code.