micro
develop
develop
  • Micro Starter Kit
  • Features
  • Getting Started
    • Why
    • Prerequisites
    • Installation
    • Makefile
  • Concepts
    • Introduction
    • Configuration
    • State
    • Select
  • Advanced
    • Dependency Injection
    • Logging
    • Error Handling
    • Life-cycle
    • Git Flow
    • Git Ops
    • mTLS
    • Release
    • Release Process
    • Pub Sub
    • Troubleshooting
  • Modules
    • Commands
      • Demo
    • Services
      • Account
      • Emailer
      • Greeter
      • Recorder
  • DevOps
    • Docker
    • KinD
    • Istio
  • Testing
    • Intro
    • Mock
    • Bloom RPC
  • Recipes
    • Authentication
    • Caching
    • Health Checks
    • Performance Testing
    • Dynamic Plugins
    • Immutability Helpers
    • Style Guide
    • Unit Testing
  • Community
    • Resources
    • Contributors
    • Contributing
  • Change Log
  • FAQ
Powered by GitBook
On this page
  • Configuration
  • Usage

Was this helpful?

  1. Modules
  2. Services

Account

This is the Account service

graph LR;
    subgraph µServices
    A(fa:fa-user Account µS)--gRPC-->G(Greeter µS) & E(Emailer µS);
    A & G & E -.-> L[Logger]
    end
    A ==lookup==> SR[[fa:fa-database Service Registry]];
    style SR fill:#f9f,stroke:#333,stroke-width:4px
  1. Implements basic CRUD API

  2. Multiple handlers, repositories, subscribers

  3. Publishing events

  4. GORM data access

  5. Config Managment

  6. Custom Logging

Configuration

  • FQDN: mkit.service.account

  • Type: service

  • Alias: account

Usage

A Makefile is included for convenience

Build the binary

make build TARGET=account TYPE=service VERSION=v0.1.1

Run the service

make run-account
make run-account ARGS="--server_address=:8080"
# or
go run service/account/main.go service/account/plugin.go

Build a docker image

make docker TARGET=account TYPE=service VERSION=v0.1.1

Test the service

micro call  mkit.service.account UserService.Create \
'{"username": "sumo", "firstName": "sumo", "lastName": "demo", "email": "sumo@demo.com"}'
micro call mkit.service.account UserService.Create \
'{"username": "sumo1", "firstName": "sumo1", "lastName": "demo1", "email": "sumo1@demo.com"}'
micro call mkit.service.account UserService.List '{}'
PreviousServicesNextEmailer

Last updated 3 years ago

Was this helpful?