Skip to content

How-to examples of micro. Feel free to contribute

License

Notifications You must be signed in to change notification settings

dhanunjaya/examples

 
 

Repository files navigation

Micro Examples Travis CI Go Report Card

This is a repository for micro examples. Feel free to contribute.

Contents

  • booking - A booking.com demo application
  • broker - A example of using Broker for Publish and Subscribing.
  • client - Usage of the Client package to call a service.
  • command - An example of bot commands as micro services
  • flags - Using command line flags with a service
  • function - Example of using Function programming model
  • graceful - Demonstrates graceful shutdown of a service
  • greeter - A complete greeter example (includes python, ruby examples)
  • plugins - How to use plugins
  • grpc - Examples of how to use go-grpc
  • redirect - An example of how to http redirect using an API service
  • roundrobin - A stateful client wrapper for true round robin of requests
  • secure - Demonstrates use of transport secure option for self signed certs
  • server - Use of the Server package directly to server requests.
  • service - Example of the top level Service in go-micro.
  • sharding - An example of how to shard requests or use session affinity
  • shutdown - Demonstrates graceful shutdown via context cancellation
  • sidecar - Greeter service using the sidecar with multiple languages
  • stream - An example of a streaming service and client
  • template - Api, web and srv service templates generated with the 'micro new' command

External

  • auth-srv - An Oauth2 authentication service
  • geo-srv - Geolocation tracking service using hailocab/go-geoindex
  • geo-web - Web demo for the geo srv
  • geo-api - API for the geo srv
  • discovery-srv - A discovery in the micro platform
  • geocode-srv - A geocoding service using the Google Geocoding API
  • hailo-srv - A service for the hailo taxi service developer api
  • monitor-srv - A monitoring service for Micro services
  • place-srv - A microservice to store and retrieve places (includes Google Place Search API)
  • slack-srv - The slack bot API as a go-micro RPC service
  • trace-srv - A distributed tracing microservice in the realm of dapper, zipkin, etc
  • twitter-srv - A microservice for the twitter API
  • user-srv - A microservice for user management and authentication

Community

Find contributions from the community via the explorer

  • go-shopping - A sample product with a suite of services

Dependencies

Service Discovery

All services require service discovery. The default is Consul or MDNS.

Consul

Install

brew install consul

Run

consul agent -dev

Multicast DNS

Use flag --registry=mdns for a zero dependency configuration

Protobuf

Protobuf is used for code generation of message types and client/hander stubs.

If making changes recompile the protos.

Install

go get github.com/micro/protobuf/{proto,protoc-gen-go}

Compile Proto

protoc -I$GOPATH/src --go_out=plugins=micro:$GOPATH/src \
        $GOPATH/src/github.com/micro/examples/service/proto/greeter.proto

About

How-to examples of micro. Feel free to contribute

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 78.0%
  • Ruby 5.6%
  • Protocol Buffer 5.1%
  • Python 4.9%
  • HTML 4.0%
  • JavaScript 1.7%
  • Other 0.7%