Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
AllData key generation module.
JavaScript
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
test
.gitignore
LICENSE
README.md
index.js
package.json

README.md

alldata-keygen

Stability: 1 - Experimental

NPM version

Key generation module for AllData, a distributed master-less append-only immutable event store database implementing "All Data" part of Lambda Architecture.

Usage

var AllDataKeygen = require('alldata-keygen');
var key = AllDataKeygen.createKey();
// 20130927T005240652508858176

Test

npm test

Overview

AllDataKeygen generates a unique key for every event to be stored in AllData.

Documentation

AllDataKeygen

Public API

AllDataKeygen.createKey()

Creates a new key. Example: 20130927T005240652508858176.

Format is YYYYMMDDThhmmsslllnnnnnnnnn:

  • YYYY current UTC year
  • MM current UTC month
  • DD current UTC day
  • T time separator
  • hh current UTC hours
  • mm current UTC minutes
  • ss current UTC seconds
  • lll current UTC milliseconds
  • nnnnnnnnn nanoseconds "unique" marker from process.hrtime()[1]; could be less than 9 digits
Something went wrong with that request. Please try again.