ECN>> eGO>> 返回
项目作者: luigi-riefolo

项目描述 :
eGO - Enlightening Golang
高级语言: Go
项目地址: git://github.com/luigi-riefolo/eGO.git
创建时间: 2017-11-07T14:37:39Z
项目社区:https://github.com/luigi-riefolo/eGO

开源协议:MIT License

下载


eGO - Enlightening Golang

License: MIT
Coverage Report
Go Report Card

eGO is a project skeleton that uses Golang and gRPC.

The intention of this project is to propose a simple approach to the
implementation of a micro-service architecture based on Golang, gRPC, Docker
and Kubernetes.

Furthermore eGO is set up to use Prometheus and Grafana for monitoring.

Users have to only define their proto definitions and implement the respective
functions, all the rest (configuration, middlewares/interceptors, etc.) is
provided by eGO.

Note: this project is still experimental and not ready for production.

Requirements

gRPC
Docker

Setup

If you are not using the Makefile, then source the environment variables:

  1. source .env

Create a Kubernetes cluster using Minikube:

  1. ./scripts/setup_kubernetes.sh

or

  1. make kubernetes

Create a private local registry:

  1. ./tools/registry/create_registry.sh --docker-user mario -e mario.mario@bros.com

Generate the gRPC configuration for a service:

  1. ./tools/grpc-generator/generate.sh --service omega --project "github.com/luigi-riefolo/eGO"

or

  1. make config omega

Build a service:

  1. ./scripts/build.sh -s alfa

or

  1. make run alfa

Build and run all the servers:

  1. make run_all

Test gateway:

  1. curl $(minikube service alfa --url)/v1/alfa/get

Start the gateway locally:

  1. go run src/alfa/cmd/main.go service -config $CONFIG_FILE
  2. BETA_SERVER_PORT=9090 go run src/alfa/cmd/main.go service -config conf/global_conf.toml
  3. go run src/alfa/cmd/main.go service -config $CONFIG_FILE -opts BETA_SERVER_PORT=9090

Credits

Thanks to all the Open Source projects that inspired eGO:

More to be mentioned.