GithubHelp home page GithubHelp logo

eriklupander / cloudtoolkit Goto Github PK

View Code? Open in Web Editor NEW
0.0 4.0 2.0 17 KB

Strongly opinionated toolkit for running Go microservices in a Spring Cloud / Netflix OSS environment

License: MIT License

Go 100.00%

cloudtoolkit's Introduction

Go Cloud Toolkit

WORK IN PROGRESS!!!!!

Strongly opinionated little toolkit for integrating a Go-based Microservice in a "typical" Spring Cloud / Netflix OSS landscape

This "cloud toolkit" is just a bit of glue around other 3rd party libraries for convenience for my own projects, but might be useful for others too. For more complete Go microservices toolkits, see go-kit.

Supported integrations

  • Hystrix through go-hystrix (with publish to Netflix Turbine/Hystrix dashboard)
  • Configuration through Viper integrating with Spring Cloud Configuration.
  • AMQP client through amqp (TODO link)
  • Zipkin / Opentracing through go-opentracing (TODO link)
  • Logging through Logrus (TODO link)
  • Eureka (through my own little Eureka library) TODO, see https://github.com/eriklupander/eeureka
  • OAuth token verification

Usage

Setting up a config repository

See https://github.com/eriklupander/go-microservice-config for some sample configuration files.

Example

Loads configuration from Spring Cloud Config server deployed in your Swarm, inits zipkin, messaging and hystrix. The sample below uses "from config property", e.g. the LoadSpringCloudConfig needs to load the following properties into viper (with sample value):

  • amqp.connection.string: amqp://guest:guest@rabbitmq:5672

  • zipkin.service.url: http://zipkin:9411

    import "github.com/eriklupander/cloudtoolkit"

    func main() { cloudtoolkit.LoadSpringCloudConfig("My application", "test", "http://configserver:8888") cloudtoolkit.InitTracingFromConfigProperty(appName)

      amqpClient = cloudtoolkit.InitMessagingClientFromConfigProperty()
      defer amqpClient.GetConn().Close()
      
      cloudtoolkit.ConfigureHystrix([]string{"get_account_secured"}, amqpClient)
    

    }

3rd party libraries

TODO

LICENSE

MIT License.

See LICENSE.md

cloudtoolkit's People

Contributors

eriklupander avatar

Watchers

 avatar  avatar  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.