1.26.1 • Published 8 days ago

@contrast/reporter v1.26.1

Weekly downloads
-
License
SEE LICENSE IN LI...
Repository
-
Last release
8 days ago

@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);
             });
          });
        }
      };
    };
1.26.1

8 days ago

1.26.0

17 days ago

1.25.1

1 month ago

1.25.0

1 month ago

1.24.0

3 months ago

1.23.2

3 months ago

1.23.1

3 months ago

1.23.0

3 months ago

1.22.1

3 months ago

1.22.2

3 months ago

1.22.0

5 months ago

1.15.0

10 months ago

1.19.0

8 months ago

1.18.0

8 months ago

1.17.0

9 months ago

1.16.0

9 months ago

1.21.0

7 months ago

1.20.1

7 months ago

1.21.1

6 months ago

1.20.0

7 months ago

1.14.0

11 months ago

1.13.0

12 months ago

1.12.0

1 year ago

1.11.0

1 year ago

1.10.0

1 year ago

1.9.1

1 year ago

1.9.0

1 year ago

1.8.2

1 year ago

1.8.1

1 year ago

1.8.0

1 year ago

1.7.0

1 year ago

1.8.3

1 year ago

1.6.2

1 year ago

1.6.1

1 year ago

1.6.0

1 year ago

1.4.2

2 years ago

1.5.0

2 years ago

1.4.1

2 years ago

1.4.0

2 years ago

1.2.0

2 years ago

1.3.0

2 years ago

1.1.0

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago