Socket
Socket
Sign inDemoInstall

botkit-storage-elasticsearch

Package Overview
Dependencies
25
Maintainers
3
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    botkit-storage-elasticsearch

A Elasticsearch storage module for Botkit


Version published
Weekly downloads
3
increased by200%
Maintainers
3
Created
Weekly downloads
 

Readme

Source

botkit-storage-elasticsearch

A Elasticsearch storage module for Botkit

Installation

npm install botkit-elasticsearch-storage

Usage

const esStorage = require('botkit-elasticsearch-storage')({
  host: process.env.ES_HOST,
  log: 'info'
}, {
  index_users: 'slack-users',
  type_users: 'slack-users',
  index_channels: 'slack-channels',
  type_channels: 'slack-channels',
  index_teams: 'slack-teams',
  type_teams: 'slack-teams',
  version_postfix: '-v1'
}, oninitstorage);

const controller = Botkit.slackbot({
  debug: false,
  storage: esStorage
});

function oninitstorage () {
  // We're now sure that indices has been created so we can start the bot.
}

Options

The first object passed to botkit-storage-elasticsearch are for elasticsearch's client. https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/quick-start.html

The second object is the object that defines the names/aliases of the indices, the client will create.

The second object can contain the following keys (see usage example):

index_users
type_users
index_channels
type_channels
index_teams
type_teams
version_postfix

FAQs

Last updated on 29 Apr 2016

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc