Microservices in Go

From NovaOrdis Knowledge Base
Revision as of 18:57, 14 December 2023 by Ovidiu (talk | contribs) (→‎Internal)
Jump to navigation Jump to search

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