Giter Club home page Giter Club logo

econfig's Introduction

#econfig - simple Erlang config handler using INI files#

Copyright (c) 2012 Benoît Chesneau.

Version: 0.3

econfig

econfig is a simple Erlang config handler to manage a config from INI files.

econfig can be use to read and update INI files. Values are cached in an ETS table and you can manage multiple configuration profile. A process can also subscribe to config updates events.

Autoreload of the config when an INI file is updated is supported, you can even manage changes from a full config directory.

See the NEWS for last changes.

Examples

Quick usage example:

1> application:start(gproc).
ok
2> application:start(econfig).
ok
3> econfig:register_config(couchdb, ["/Users/benoitc/refuge/rcouch/rel/rcouch/etc/default.ini", "/Users/benoitc/refuge/rcouch/rel/rcouch/etc/local.ini"], [autoreload]).
ok
4> econfig:subscribe(couchdb).
true
5> econfig:get_value(couchdb, "couchdb").
[{"delayed_commits","true"},
{"file_compression","snappy"},
{"os_process_timeout","5000"},
{"uri_file","./data/couch.uri"},
{"index_dir","./data"},
{"max_document_size","4294967296"},
{"database_dir","./data"},
{"max_dbs_open","100"}]
6> econfig:set_value(couchdb, "ssl", "test", "1").
ok
7> flush().
Shell got {config_updated,couchdb,{set,{"ssl","test"}}}
ok

Contribute

For issues, comments or feedback please [create an issue!] [1][1]: http://github.com/benoitc/econfig/issues "econfig issues"

##Modules##

econfig
econfig_app
econfig_file_writer
econfig_server
econfig_sup
econfig_util
econfig_watcher
econfig_watcher_sup

econfig's People

Contributors

benoitc avatar

Watchers

 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.