Skip to content

grosser/consulenv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Set ENV values from consul KV lookups

Check out if envconsul solves your needs before trying this.

  • Uses Consul transactions api to only do a single request for all keys.
  • Fails if consul returns any errors
  • Returns not found as nil
  • Connects to CONSUL_HTTP_ADDR ENV var or localhost:8500
  • TODO: support CONSUL_HTTP_SSL

Install

Not released to rubygems since this is just a proof of concept atm ... to use it clone the repo or download lib/enconsul.rb

Let me know if you want to use it and I can release it to rubygems.

Usage

Consulenv.load(
  "some/key" => "ENV_KEY_TO_USE",
  "other/key" => "FOOBAR",
)

Author

Michael Grosser
michael@grosser.it
License: MIT
Build Status

About

Set ENV values from consul KV lookups

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages