Discover Packages
github.com/redBorder/events-counter
counter
package
Version:
v0.0.0-...-b25ce53
Opens a new window with list of versions in this module.
Published: Nov 8, 2023
License: AGPL-3.0
Opens a new window with license information.
Imports: 3
Opens a new window with list of imports.
Imported by: 1
Opens a new window with list of known importers.
Documentation
Documentation
¶
type Config struct {
Workers int
}
Config contains the configuration for a Counter
type Counter struct {
Config
}
Counter counts the number of messages sents
OnMessage is called when a new message is receive. Counts the number of
bytes on the message (or messages if a batch is received) and send a JSON
formatted message to the next component.
Spawn creates a new instance of a Counter worker
Workers returns the number of workers
type Monitor struct {
Monitor string `json:"monitor"`
Unit string `json:"unit"`
Value uint64 `json:"value"`
UUID string `json:"organization_uuid"`
Timestamp int64 `json:"timestamp"`
}
Monitor contains the data for generate a JSON with the count of bytes/messages
Source Files
¶
Click to show internal directories.
Click to hide internal directories.