Skip to content

Alma-media/eop09

Repository files navigation

eop09

License CI Report Card

Golang microservices. Task for "two hours".

Installation

$ go get github.com/Alma-media/eop09

Run

  • server:
$ go run main.go -port 5050
  • client:
$  go run main.go -file path/to/file -grpc-addr localhost:5050 -http-port 8080

Further improvements

Client

  1. API
  • HTTPs support
  • advanced routing
  • http middleware (jwt, auth, timeout etc)
  • enable codec middleware and retrieve codec from the context to use corresponding encoder
  • pass logger to the handler (intermal errors should be logged but not exposed to the user)
  1. Config
  • introduce config struct and use a library to parse the values from flags, toml, yaml, json, hcl ...

Server

  1. Service
  • TLS
  • server side interceptors
  • register reflection API
  • graceful shutdown
  1. Storage
  • choose another storage implementation that uses the context and is able to fail / return an error (e.g. database, blockchain etc)

About

Golang microservices

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published