Microservices in Go: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 7: Line 7:


=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. The entire application is developed as a [[Go_Modules#Overview|module]].
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]].

Revision as of 21:39, 28 September 2023

External

Internal

Overview

Working Example

https://github.pie.apple.com/ovidiu-feodorov/go-micros

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