Git Product home page Git Product logo

gsr's Issues

Move to a no-global-vars architecture

Remove all global vars from gsr. No global loggers or configuration options. Use a Config struct, passed in to the New() function and allow the overriding of log handlers.

Use gofmt

Even though I am not a fan of the canonical Go code style, gsr is a Go library and should follow go code formatting guidelines. Therefore, I need to update my vimrc for .go files and use gofmt for reformatting the existing files.

Allow configurable logging

Now that we no longer use the global log setup and instead have a registryLogs struct that we can hang loggers off, we should add some configurability around logging.

I'm thinking something like this:

GSR_LOG_MODE environment variable would be a string like "Ldate | Ltime | Lshortfile" that would allow the user to enable a particular log record format and align gsr's logging with their own application's needs/expectations.

Add tests for TLS setup

Need to test the TLS mode and configuration options. Use a self-signed cert for basic tests.

test high-frequency register/unregister

Develop an end-to-end test that spins up a single backing etcd store container and multiple data and web example containers, each registering themselves with gsr. Have the test script call docker stop on many of the data and web containers and query the remaining ones that the expected endpoints are still what they should be, even with many unregisters that happen on docker stop (SIGTERM) of other endpoint containers.

Switch to dep

Now that dep is the vendor/dependency tool of choice, switch to it...

Create `Registry.Unregister()` method

The gsr.Registry.Register() method is used to register some running code as a service endpoint in gsr. We need a corresponding method to de-register the same service endpoint. This Unregister() method can then be called in a SIGTERM handler.

Switch from rkt to a docker-compose system for examples/testing

The examples/ directory contains some Bash scripts that launch an etcd container and some example web and data access service containers using rkt. Let's switch those over to use Docker Compose, which is probably more familiar to most folks than rkt.

Build and test with Docker

Build the gsr library and test it with Docker instead of the custom rkt-based scripts currently included.

Clean up logging

Determine whether to go with an open source structured logging package or standardize the tri-level + ERROR logging package that I've been using for most application projects.

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.