Comments (16)
Which configuration directives should be moved to yaml? The command line switches?
from beanstalkg.
@vimukthi-git I'd like to work on this tomorrow. go-yaml
is my go to.
from beanstalkg.
@stephenwithav there is not much to move right now, they are basically the parameters taken as command line arguments in main. You can ignore proxy_mode
since I want to remove it.
One of the things I care about is to have the parameters defined in yaml
to be read from the environment for example the port
. this is useful for container environments.
from beanstalkg.
@vimukthi-git understood. I'll find a yaml package that allows environment variables to override.
Or I'll just overwrite anything that's also specified in the environment.
from beanstalkg.
@stephenwithav great let me know when you have found a good one.
You can take your time with this as its prioritised for v0.8.0 in our roadmap.
from beanstalkg.
https://github.com/spf13/viper
@vimukthi-git this library will work well.
from beanstalkg.
looks good, I have seen this lib before. We can go with it no problem.
from beanstalkg.
@vimukthi-git I'm about to push. The compiler complained when I removed proxy_mode
from the config (variable defined and not used), so I went ahead and removed proxy support altogether since you wanted it gone.
Removing proxy support removed the call to getConfig
, which led to the not used error for env
, so I removed it, too.
from beanstalkg.
@stephenwithav can we try https://github.com/jinzhu/configor ? seems more simple and matching to our requirement.
from beanstalkg.
@vimukthi-git we certainly can try. The update will be pushed tomorrow.
from beanstalkg.
@vimukthi-git given flags, environment, and YAML, which is the highest priority?
I'm assuming command-line flags override environment variables, which override the YAML configuration.
Do you agree?
from beanstalkg.
@vimukthi-git configor
works, but doesn't follow the 12 Factor guidelines. Environment variables override command-line flags, when it should be the opposite.
from beanstalkg.
See here for the test: https://github.com/stephenwithav/configor-test
from beanstalkg.
@stephenwithav thanks for the update. Can we use it for now and may be fork and change it later to make it follow the correct override order?
from beanstalkg.
@vimukthi-git yes we can. And I can mimic the 12 Factor behavior with configor
, if needed.
from beanstalkg.
The example repo is now corrected to ensure that command-line flags override environment variables. I'll integrate it shortly.
from beanstalkg.
Related Issues (20)
- Implement stats command
- Implement list-tubes command HOT 7
- implement list-tube-used command
- implement list-tubes-watched command
- Implement quit command HOT 2
- implement pause-tube command
- Create integration test framework
- Try ginkgo HOT 1
- bury command results with BAD_FORMAT error HOT 1
- consider introducing a cmd package for main
- Introduce validation for command parameters in protocol config HOT 4
- Rename log instances to logg. HOT 8
- Add interfaces to allow jobs and job history to be persisted.
- Check if existing beanstalkd clients have a problem with job ids being string HOT 2
- reserve-with-timeout seem to be buggy HOT 2
- debug log at every tick on master branch HOT 1
- Cannot resolve getConfig HOT 2
- Delete command does not delete the job sometimes when there are many workers connected to the same tube
- Disconnected clients create problem with job serving for other clients
- dead? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from beanstalkg.