jaypipes / gsr Goto Github PK
View Code? Open in Web Editor NEWGolang Service Registry library
License: Apache License 2.0
Golang Service Registry library
License: Apache License 2.0
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.
Add a .travis.yml file to the root and start CI testing gsr
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.
CoreOS moved the etcd repository imports from:
github.com/coreos/etcd/clientv3
to:
go.etcd.io/etcd/clientv3
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.
Need to test the TLS mode and configuration options. Use a self-signed cert for basic tests.
It's just bad practice to have open-ended vendored dependencies. Make sure we are pinning all dependent code with a specific tag or release in vendor/vendor.json
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.
I now have 4 different applications or other libraries that use the code in env.go
. Pull it out into its own separate little lib.
Now that dep
is the vendor/dependency tool of choice, switch to it...
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.
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 the gsr library and test it with Docker instead of the custom rkt-based scripts currently included.
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.