Inputs
Input Plugin Overview
Basic Architecture
// Sensor is the base interface for all input sensors.
type Sensor interface {
// Listen creates a channel that continuously yields raw input events.
Listen(ctx context.Context) (<-chan any, error)
// Poll retrieves a single raw input event.
Poll(ctx context.Context) (any, error)
// RawToText converts raw input data into Message format.
RawToText(ctx context.Context, rawInput any) (*Message, error)
// FormattedLatestBuffer returns the formatted buffer string.
FormattedLatestBuffer() string
// Stop signals the sensor to stop listening and clean up resources.
Stop()
}Examples
Last updated
Was this helpful?