Giter Club home page Giter Club logo

examples's Introduction

Micro Examples Travis CI Go Report Card

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

i18n

中文版本

Contents

Most likely needed examples

  • service - A sample micro service
  • greeter - A complete greeter example
  • booking - A demo end to end application

Other

  • api - Provides API usage examples
  • 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
  • config - Using Go Config for dynamic config
  • event - Using the API Gateway event handler
  • filter - Filter nodes of a service when requesting
  • flags - Using command line flags with a service
  • form - How to parse a form behind the micro api
  • function - Example of using Function programming model
  • getip - Get the local and remote ip from metadata
  • graceful - Demonstrates graceful shutdown of a service
  • greeter - A complete greeter example (includes python, ruby examples)
  • heartbeat - Make services heartbeat with discovery for high availability
  • helloworld - Hello world using micro
  • kubernetes - Examples of using the k8s registry and grpc
  • metadata - Extracting metadata from context of a request
  • mocking - Demonstrate mocking helloworld service
  • noproto - Use micro without protobuf or code generation, only go types
  • options - Setting options in the go-micro framework
  • plugins - How to use plugins
  • pubsub - Example of using pubsub at the client/server level
  • grpc - Examples of how to use go-micro/service/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
  • stream - An example of a streaming service and client
  • template - Api, web and srv service templates generated with the 'micro new' command
  • tunnel - How to use connection tunneling with the tunnel package
  • waitgroup - Demonstrates how to use a waitgroup with a service
  • wrapper - A simple example of using a log wrapper

Community

Find contributions from the community via the explorer

  • go-shopping - A sample product with a suite of services
  • shippy - A multi app demo and tutorial
  • microhq - A place for micro services

Dependencies

Service Discovery

All services require service discovery. The default is multicast DNS, a zeroconf system.

If you need something multi-host or more resilient use consul.

Consul

# install
brew install consul

# run
consul agent -dev

Use flag --registry=consul to enable the consul registry.

Protobuf

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

If making changes recompile the protos.

Install

Install protoc for your environment. Then:

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

Compile Proto

protoc --proto_path=$GOPATH/src:. --micro_out=. --go_out=. path/to/proto

examples's People

Contributors

asim avatar printfcoder avatar kveselkov avatar matchbookmac avatar bvwells avatar caofangkun avatar swedishborgie avatar milosgajdos avatar moorepatrick avatar doertedev-instana avatar stevexuereb avatar joseenriquevasquez avatar maurerit avatar springe2004 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.