Documentation ¶
Overview ¶
Package integrations adds a go interface for integrations to register and send logs.
The integrations component is a basic interface for integrations to send logs from one place to another. Integrations and their configs can be registered using the RegisterIntegrations function and then use the SendLog function to send logs to consumers, who will use the SubscribeIntegration and Subscribe functions to receive integration configs and logs.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Component ¶
type Component interface { // RegisterIntegration registers an integration with the component. RegisterIntegration(id string, config integration.Config) // SubscribeIntegration returns a channel for a subscriber to receive integration configurations. SubscribeIntegration() chan IntegrationConfig // Subscribe subscribes returns a channel for a subscriber to receive logs from integrations. Subscribe() chan IntegrationLog // SendLog allows integrations to send logs to any subscribers. SendLog(log, integrationID string) }
Component is the component type.
type IntegrationConfig ¶
type IntegrationConfig struct { IntegrationID string Config integration.Config }
IntegrationConfig represents the combined ID and Config for an integration
type IntegrationLog ¶
IntegrationLog represents the combined Log and IntegrationID for the integration sending the log