Sam Batschelet
and 1 contributors

NAME

Dancer2::Plugin::Etcd

SYNOPSIS

    get '/foo/:name' => sub {
        $tokens = shift;
        $etcd = etcd('foo');
        $name = param('name');
        $tokens->{name} = $etcd->range({ key => $name })->get_value;
        [ ... ]
    };

    # save development configs to etcd
    shepherd put

    # retrieve latest version of configs
    shepherd get

DESCRIPTION

The etcd keyword which is exported by this plugin allows you to connect directly to etcd v3 api.

shepherd

By far the most interesting part of this module is shepherd. shepherd allows you to save Dancer App YAML configs to etcd by line as key/value. Even more interesting is that it maintains your comments. An example of usage would be spawning a container with the application then simply running shepherd get --env=production would bring in the latest production configs for your app.

CONFIGURATION

single e.g.:

    plugins:
      Etcd:
        host: 127.0.0.1
        port: 4001
        user: samb
        password: h3xFu5ion
        ssl: 1

named e.g.:

    plugins:
      Etcd:
        connections:
          foo:
            host: 127.0.0.1
            port: 4001
            user: samb
            password: h3xFu5ion
          bar:
            host: 127.0.0.1
            port: 2379

connections

host

default 127.0.0.1

port

default 2379

etcd_connection_name

username

Etcd username.

password

Etcd user password.

ssl

Secure connection is recommended,

KEYWORDS

etcd

AUTHOR

Sam Batschelet, <sbatschelet at mac.com>

ACKNOWLEDGEMENTS

The Dancer2 developers and community for their great application framework and for their quick and competent support.

LICENSE AND COPYRIGHT

Copyright 2016 Sam Batschelet (hexfusion).

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See http://dev.perl.org/licenses/ for more information.