Giter VIP home page Giter VIP logo

environ-dynamo's Introduction

environ-dynamo

A simple extension to environ that polls a DynamoDB table for configuration overrides.

Configuration

You config environ-dynamo via environ itself; the following environ keys are used:

  • :environ-dynamo-access-key Your AWS access key.
  • :environ-dynamo-secret-key Your AWS secret key.
  • :environ-dynamo-endpoint The AWS endpoint to use (may also be used to specify the AWS region).
  • :environ-dynamo-profile The credential profile to use, in lieu of access/secret keys.
  • :environ-dynamo-table-name The name of the table to scan. The default is "environProperties".
  • :environ-dynamo-poll-interval The interval between polls, in milliseconds. The default is 60000.
  • :environ-dynamo-poll-limit The number of entries to scan in each poll. Default is 100. If this is zero or negative, then polling is not done (but the table is read at least once).

Table Format

The DynamoDB table must contain at least two fields: key and value. The key field is taken as the key, and is massaged into a keyword the same way environ does: lowercased, with _ or . replaced by -; the key field should also be the partition key of the table. The value field should contain strings.

Usage

(ns example
  (:require [environ.dynamo :as env]))
  
;;; Starts polling DynamoDB.
(env/start-polling!)

;;; Results from DynamoDB are merged with environ.core/env
(:some-config (env/env))

;;; You can stop polling too.
(env/stop-polling!)

Thanks

Inspired by archaius.

environ-dynamo's People

Watchers

 avatar  avatar

environ-dynamo's Issues

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.