Skip to content

Commit 4e010e6

Browse files
fix README and bump version for publication
1 parent 75d575b commit 4e010e6

File tree

2 files changed

+23
-37
lines changed

2 files changed

+23
-37
lines changed

README.md

Lines changed: 22 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -11,46 +11,32 @@ This repository contains the common JavaScript functions used by Node.js collect
1111

1212
# HOWTO use this library in an AWS Lambda function
1313

14-
Create a `package.json` file for [npm](https://www.npmjs.com/) 2.7.0 (or greater) in the root of your AWS Lambda function Node.js root directory. Include this repo in the `dependencies` and `devDependencies` section as required.
14+
To install:
15+
`npm i @alertlogic/al-aws-collector-js`
1516

16-
For example:
17-
18-
```
17+
in your file
18+
```javascript
1919
{
20-
"name": "al-my-collector",
21-
"version": "1.0.0",
22-
"description": "Alert Logic My Collector",
23-
"repository": {},
24-
"private": true,
25-
"scripts": {
26-
"start": "node index.js",
27-
"lint": "jshint --exclude \"./node_modules/*\" **/*.js",
28-
"test": "JUNIT_REPORT_PATH=./test/report.xml nyc --reporter=cobertura mocha --colors --reporter mocha-jenkins-reporter"
29-
},
30-
"devDependencies": {
31-
"aws-sdk": "*",
32-
"aws-sdk-mock": "*",
33-
"dotenv": "*",
34-
"clone": "*",
35-
"jshint": "^2.9.5",
36-
"mocha": "^3.5.3",
37-
"mocha-jenkins-reporter": "^0.3.10",
38-
"nyc": "^11.3.0",
39-
"rewire": "^2.5.2",
40-
"sinon": "^3.3.0"
41-
},
42-
"dependencies": {
43-
"async": "*",
44-
"cfn-response": "*",
45-
"moment": "^2.19.2",
46-
"request": "*",
47-
"request-promise-native": "*",
48-
"al-aws-collector-js": "git://github.com/alertlogic/al-aws-collector-js#master"
49-
},
50-
"author": "Alert Logic Inc."
51-
}
20+
AlAwsCollector,
21+
} = require('@alertlogic/al-aws-collect-js');
5222
```
5323

24+
# API
25+
26+
## `AlAwsCollector`
27+
Base class for AWS lambda based collectors
28+
29+
@param {Object} context - context of Lambda's function.
30+
@param {string} collectorType - collector type (cwe as example).
31+
@param {string} ingestType - ingest data type (secmsgs, vpcflow, etc).
32+
@param {string} version - version of collector.
33+
@param {Object} aimsCreds - Alert Logic API credentials.
34+
@param {string} [aimsCreds.access_key_id] - Alert Logic API access key id.
35+
@param {string} [aimsCreds.secret_key] - Alert Logic API secret key.
36+
@param {function} formatFun - callback formatting function
37+
@param {Array.<function>} healthCheckFuns - list of custom health check functions (can be just empty, so only common are applied)
38+
@param {Array.<function>} statsFuns - list of custom stats functions (can be just empty, so only common are applied)
39+
5440
# Debugging
5541

5642
To get a debug trace, set an Node.js environment variable called DEBUG and

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@alertlogic/al-aws-collector-js",
3-
"version": "1.1.0",
3+
"version": "1.1.1",
44
"license": "MIT",
55
"description": "Alert Logic AWS Collector Common Library",
66
"repository": {

0 commit comments

Comments
 (0)