micro-starter-kit icon indicating copy to clipboard operation
micro-starter-kit copied to clipboard

How to use cmd demo.go program?

Open ygpark2 opened this issue 5 years ago • 2 comments

Hi there.

I'm very pleased to meet such a wonderful go micro starter kit program that you built.

I had one thing that I couldn't fully understand in your project.

The thing is the usage of application under the cmd folder.

I figured it out how to use the service code. But to me, the code under the cmd folder is still vague to me.

I guess the demo.go file under the cmd folder is designed to load those 4 services under the service folder for service. But it doesn't seem to work that way.

However, when I look at the deploy folder, those 4 services seem to be loaded one by one on kubernetes application? In this case, what is the role of demo application under cmd folder?

Please help me grasp the role demo application under the cmd folder.

Thank you

ygpark2 avatar May 27 '20 13:05 ygpark2

the intent for /cmd/* components are: for showcasing CLI apps (they could be simple demos or they could be gRPC clients talking to, for example account service), they can use command line flags as input and used them to compose payload for calling remote gRPC services.

I refactored some directories and documented yesterday. The top-level directories:

  • config [config.yaml , certs and also k8s deployment YAMLs]
  • cmd [ CLI Apps]
  • service [ micro services]
  • shared [shared common code across all microservices in /service]
  • e2e [end to end testing , integration testing]

Check-out makefile.md docs for developer instructions here: https://github.com/xmlking/micro-starter-kit/tree/develop/docs/introduction

xmlking avatar Jun 10 '20 18:06 xmlking

Update the cmd/* CLI to what I originally intended for https://github.com/xmlking/micro-starter-kit/tree/develop/cmd/account

xmlking avatar Jun 11 '20 01:06 xmlking