@contrast/reporter v1.26.1
@contrast/reporter
Set up agent IO.
Reporting in the agent follows the PUB-SUB model. Reporters are nothing more than subscribers of messages published by the various agent components. Reporters can collect messages of interest and do with them what they will.
If a reporter want's to communicate with the agent, e.g. send it new settings to update feature behaviors, then it will publish the appropirate message to which the agent component is listening.
Main Ideas
Like other services, core will compose
@contrast/reporters
into the dependency container object.const { reporters } require('@contrast/core')();
Clients can than
await
any reporter initialization code and respond to any errors.try { await reporters.install(); } catch (error) { // maybe we failed to connect to teamserver or something? // decide what to do. }
Other than that, it's just plugging into the agent's event stream.
// e.g. teamserver Protect reporter pseudocode module.exports = function(deps) { return { async install() { await this.startup(deps); await this.appCreate(deps); ['InputAnalysis', 'BlockAtPerimeter', 'SinkEvent', 'HTTPRequest'].forEach((msgName) => { deps.messages.on(msgName, (msg) => { putInQueueAndReportLater(msgName, msg); }); }); } }; };
8 days ago
17 days ago
1 month ago
1 month ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
5 months ago
10 months ago
8 months ago
8 months ago
9 months ago
9 months ago
7 months ago
7 months ago
6 months ago
7 months ago
11 months ago
12 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago