Microservices in Go: Difference between revisions
Jump to navigation
Jump to search
(9 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
=External= | =External= | ||
* [https://www.amazon.com/Microservices-Go-Building-scalable-microservices-ebook/dp/B0BHWM674P Microservices with Go: Building scalable and reliable microservices with Go] by Alexander Shuiskov | * [https://www.amazon.com/Microservices-Go-Building-scalable-microservices-ebook/dp/B0BHWM674P Microservices with Go: Building scalable and reliable microservices with Go] by Alexander Shuiskov | ||
=TODO= | |||
<font color=darkkhaki> | |||
* Finalize the book, left here: https://learning.oreilly.com/library/view/microservices-with-go/9781804617007/B18865_09.xhtml#:-:text=Testing%20is%20an,always%20important%20to | |||
* Distill the Handler/Controller/Persistence model into a NOKB article. | |||
</font> | |||
=Internal= | =Internal= | ||
* [[Go_Project#Microservice-based_Project_Layout|Go Project]] | |||
* [[Go_Code_Examples|Go Code Examples]] | * [[Go_Code_Examples|Go Code Examples]] | ||
* [[Microservices]] | * [[Microservices]] | ||
* [[API Concepts]] | |||
=Overview= | =Overview= | ||
=Working Example= | |||
{{External|https://github.pie.apple.com/ovidiu-feodorov/go-micros}} | |||
=Project Layout= | =Project Layout= | ||
Each of the services <code>metadata</code>, <code>movie</code>, <code>rating</code> contains multiple packages. | Each of the services <code>metadata</code>, <code>movie</code>, <code>rating</code> contains multiple packages. The entire application is developed as a [[Go_Modules#Overview|module]]. | ||
<font size=-2> | <font size=-2> | ||
. | . | ||
├── README.md | ├── README.md | ||
├── go.mod | |||
├── metadata | ├── metadata | ||
│ | │ ├── cmd | ||
│ | │ │ └── main.go | ||
│ ├── internal | |||
│ │ ├── controller | |||
│ │ ├── handler | |||
│ │ └── repository | |||
│ └── pkg | |||
├── movie | ├── movie | ||
│ └── cmd | │ └── cmd | ||
Line 20: | Line 40: | ||
└── main.go | └── main.go | ||
</font> | </font> | ||
<syntaxhighlight lang='bash'> | |||
go mod init go-micros | |||
</syntaxhighlight> | |||
=Service Overview= | |||
* API | |||
* Data model | |||
* Business logic | |||
* Database (persistence) | |||
* Service dependencies |
Latest revision as of 20:18, 14 May 2024
External
- Microservices with Go: Building scalable and reliable microservices with Go by Alexander Shuiskov
TODO
- Finalize the book, left here: https://learning.oreilly.com/library/view/microservices-with-go/9781804617007/B18865_09.xhtml#:-:text=Testing%20is%20an,always%20important%20to
- Distill the Handler/Controller/Persistence model into a NOKB article.
Internal
Overview
Working Example
Project Layout
Each of the services metadata
, movie
, rating
contains multiple packages. The entire application is developed as a module.
. ├── README.md ├── go.mod ├── metadata │ ├── cmd │ │ └── main.go │ ├── internal │ │ ├── controller │ │ ├── handler │ │ └── repository │ └── pkg ├── movie │ └── cmd │ └── main.go └── rating └── cmd └── main.go
go mod init go-micros
Service Overview
- API
- Data model
- Business logic
- Database (persistence)
- Service dependencies