Monyt
Constructor Summary
| Public Constructor | ||
| public | 
       constructor(options: Object): Monyt  | 
    |
Member Summary
| Public Members | ||
| public | 
       aggregator: *  | 
    |
| public | 
       interval: *  | 
    |
| public | 
      
       | 
    |
| public | 
      
       | 
    |
| public | 
       senders: *  | 
    |
Method Summary
| Public Methods | ||
| public | 
      
       | 
    |
| public | 
      
       Start to aggregate and send metricses.  | 
    |
| public | 
       middlewares(): Array  | 
    |
| public | 
      
       Stop to listen.  | 
    |
Public Constructors
public constructor(options: Object): Monyt source
Params:
| Name | Type | Attribute | Description | 
| options | Object | 
  | 
      Options to initialize Monyt.  | 
    
| options.interval | string | 
  | 
      Interval to listen aggregate.  | 
    
| options.metricses | Array<Metrics> | 
  | 
      List of Metrics to aggregate.  | 
    
| options.senders | Array<Sender> | 
  | 
      List of sender to send metricses.  | 
    
| options.listener | Promise | 
  | 
      Promise()] - Listener of MetricsAggregator.  | 
    
| options.prefix | string | 
  | 
      Prefix of metrics name.  | 
    
| options.aggregator | Object | 
  | 
      MetricsAggregator({...options, interval: this.interval})] - Instance of MetricsAggregator.  | 
    
| options.logger | Logger | 
  | 
      Logger Class to use.  | 
    
| options.replaceConsole | boolean | 
  | 
      Replace Console with Logger.  | 
    
Public Members
public aggregator: * source
public interval: * source
public replaceConsole: * source
public senders: * source
Public Methods
public getLogger(options: Object): Logger source
Params:
| Name | Type | Attribute | Description | 
| options | Object | 
  | 
      Options to initialize logger instance.  | 
    
| options.category | string | 
  | 
      Category of logger.  | 
    
| options.level | string | 
  | 
      Level to log.  | 
    
| options.replaceConsole | boolean | 
  | 
      Flag to switch replaceConsole options.  | 
    
public listen(callback: Function): Number source
Start to aggregate and send metricses. Replace Console to default logger when replaceConsole is true.
Params:
| Name | Type | Attribute | Description | 
| callback | Function | callback function that returns result promises of senders.  |