Skip to content
On this page

Etcd

Installation

bash
npm install @willsoto/node-konfig-etcd
bash
yarn add @willsoto/node-konfig-etcd
bash
pnpm add @willsoto/node-konfig-etcd

Usage

typescript
import * as Konfig from "@willsoto/node-konfig-core";
import { EtcdLoader } from "@willsoto/node-konfig-etcd";

const loader = new EtcdLoader({
  keys: [
    {
      accessor: "database",
      parser: new Konfig.JSONParser(),
    },
  ],
});

Check the documentation for etcd3 for configuration options.

Options

NameRequiredDescription
keysyesAn array of values to load. See Key for more information.
etcd3OptionsnoIOptions

Key

NameRequiredDescription
accessoryesThe path to the value in Etcd.