2021-09-30 11:29:32 -05:00
|
|
|
package pipeline
|
|
|
|
|
|
|
|
type EntityInfo struct {
|
|
|
|
Type string `json:"type"`
|
|
|
|
Description string `json:"description"`
|
|
|
|
Example interface{} `json:"example,omitempty"`
|
|
|
|
}
|
|
|
|
|
|
|
|
var SubscribersRegistry = []EntityInfo{
|
|
|
|
{
|
|
|
|
Type: SubscriberTypeBuiltin,
|
|
|
|
Description: "apply builtin feature subscribe logic",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
Type: SubscriberTypeManagedStream,
|
|
|
|
Description: "apply managed stream subscribe logic",
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
2021-10-06 12:43:25 -05:00
|
|
|
var FrameOutputsRegistry = []EntityInfo{
|
2021-09-30 11:29:32 -05:00
|
|
|
{
|
2021-10-06 12:43:25 -05:00
|
|
|
Type: FrameOutputTypeManagedStream,
|
|
|
|
Description: "only send schema when structure changes (note this also requires a matching subscriber)",
|
2021-09-30 11:29:32 -05:00
|
|
|
Example: ManagedStreamOutputConfig{},
|
|
|
|
},
|
|
|
|
{
|
2021-10-06 12:43:25 -05:00
|
|
|
Type: FrameOutputTypeConditional,
|
2021-09-30 11:29:32 -05:00
|
|
|
Description: "send to an output depending on frame values",
|
|
|
|
Example: ConditionalOutputConfig{},
|
|
|
|
},
|
|
|
|
{
|
2021-10-06 12:43:25 -05:00
|
|
|
Type: FrameOutputTypeRedirect,
|
|
|
|
Description: "redirect for processing by another channel rule",
|
2021-09-30 11:29:32 -05:00
|
|
|
},
|
|
|
|
{
|
2021-10-06 12:43:25 -05:00
|
|
|
Type: FrameOutputTypeThreshold,
|
|
|
|
Description: "output field threshold boundaries cross into new channel",
|
2021-09-30 11:29:32 -05:00
|
|
|
},
|
|
|
|
{
|
2021-10-06 12:43:25 -05:00
|
|
|
Type: FrameOutputTypeChangeLog,
|
|
|
|
Description: "output field changes into new channel",
|
2021-09-30 11:29:32 -05:00
|
|
|
},
|
|
|
|
{
|
2021-10-06 12:43:25 -05:00
|
|
|
Type: FrameOutputTypeRemoteWrite,
|
|
|
|
Description: "output to remote write endpoint",
|
2021-09-30 11:29:32 -05:00
|
|
|
},
|
2021-11-09 04:10:43 -06:00
|
|
|
{
|
|
|
|
Type: FrameOutputTypeLoki,
|
|
|
|
Description: "output frame as JSON to Loki",
|
|
|
|
},
|
2021-09-30 11:29:32 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
var ConvertersRegistry = []EntityInfo{
|
|
|
|
{
|
2021-10-06 12:43:25 -05:00
|
|
|
Type: ConverterTypeJsonAuto,
|
|
|
|
Description: "automatic recursive JSON to Frame conversion",
|
2021-09-30 11:29:32 -05:00
|
|
|
},
|
|
|
|
{
|
|
|
|
Type: ConverterTypeInfluxAuto,
|
|
|
|
Description: "accept influx line protocol",
|
2021-10-19 02:50:17 -05:00
|
|
|
Example: AutoInfluxConverterConfig{
|
|
|
|
FrameFormat: "labels_column",
|
|
|
|
},
|
2021-09-30 11:29:32 -05:00
|
|
|
},
|
|
|
|
{
|
2021-10-06 12:43:25 -05:00
|
|
|
Type: ConverterTypeJsonFrame,
|
|
|
|
Description: "JSON-encoded Grafana data frame",
|
2021-09-30 11:29:32 -05:00
|
|
|
},
|
|
|
|
}
|
|
|
|
|
2021-10-06 12:43:25 -05:00
|
|
|
var FrameProcessorsRegistry = []EntityInfo{
|
2021-09-30 11:29:32 -05:00
|
|
|
{
|
2021-10-06 12:43:25 -05:00
|
|
|
Type: FrameProcessorTypeKeepFields,
|
2021-09-30 11:29:32 -05:00
|
|
|
Description: "list the fields that should stay",
|
2021-10-06 12:43:25 -05:00
|
|
|
Example: KeepFieldsFrameProcessorConfig{},
|
2021-09-30 11:29:32 -05:00
|
|
|
},
|
|
|
|
{
|
2021-10-06 12:43:25 -05:00
|
|
|
Type: FrameProcessorTypeDropFields,
|
2021-09-30 11:29:32 -05:00
|
|
|
Description: "list the fields that should be removed",
|
2021-10-06 12:43:25 -05:00
|
|
|
Example: DropFieldsFrameProcessorConfig{},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
var DataOutputsRegistry = []EntityInfo{
|
|
|
|
{
|
|
|
|
Type: DataOutputTypeBuiltin,
|
|
|
|
Description: "use builtin publish handler",
|
2021-09-30 11:29:32 -05:00
|
|
|
},
|
|
|
|
{
|
2021-10-06 12:43:25 -05:00
|
|
|
Type: DataOutputTypeRedirect,
|
|
|
|
Description: "redirect data processing to another channel rule",
|
2021-09-30 11:29:32 -05:00
|
|
|
},
|
2021-11-09 04:10:43 -06:00
|
|
|
{
|
|
|
|
Type: DataOutputTypeLoki,
|
|
|
|
Description: "output data to Loki as logs",
|
|
|
|
},
|
2021-09-30 11:29:32 -05:00
|
|
|
}
|