Documentation ¶
Index ¶
- Constants
- func WithAuthenticator(authenticator connectors.HttpAuthenticator) simpleReceiverOpt
- func WithBody(body any) simpleReceiverOpt
- func WithEventsDecoder(decoder EventsDecoderFunc) simpleReceiverOpt
- func WithHeaders(headers map[string]string) simpleReceiverOpt
- func WithLogsDecoder(decoder LogsDecoderFunc) simpleReceiverOpt
- func WithMethod(method string) simpleReceiverOpt
- func WithMetricsDecoder(decoder MetricsDecoderFunc) simpleReceiverOpt
- func WithTimeout(timeout time.Duration) simpleReceiverOpt
- type Component
- type EventsDecoderFunc
- type EventsExporter
- type EventsPipeline
- func (p *EventsPipeline) AddExporter(exporter EventsExporter)
- func (p *EventsPipeline) AddProcessor(processor ProcessorFunc[model.Event])
- func (p *EventsPipeline) AddReceiver(receiver EventsReceiver)
- func (p *EventsPipeline) Execute(ctx context.Context) error
- func (p *EventsPipeline) ExecuteSync(ctx context.Context) []error
- func (p *EventsPipeline) Shutdown(ctx context.Context) error
- func (p *EventsPipeline) Start(ctx context.Context, wg *sync.WaitGroup) error
- type EventsReceiver
- type Exporter
- type ExporterAdapter
- type ExporterFunc
- type LogsDecoderFunc
- type LogsExporter
- type LogsPipeline
- func (p *LogsPipeline) AddExporter(exporter LogsExporter)
- func (p *LogsPipeline) AddProcessor(processor ProcessorFunc[model.Log])
- func (p *LogsPipeline) AddReceiver(receiver LogsReceiver)
- func (p *LogsPipeline) Execute(ctx context.Context) error
- func (p *LogsPipeline) ExecuteSync(ctx context.Context) []error
- func (p *LogsPipeline) Shutdown(ctx context.Context) error
- func (p *LogsPipeline) Start(ctx context.Context, wg *sync.WaitGroup) error
- type LogsReceiver
- type MetricsDecoderFunc
- type MetricsExporter
- type MetricsPipeline
- func (p *MetricsPipeline) AddExporter(exporter MetricsExporter)
- func (p *MetricsPipeline) AddProcessor(processor ProcessorFunc[model.Metric])
- func (p *MetricsPipeline) AddReceiver(receiver MetricsReceiver)
- func (p *MetricsPipeline) Execute(ctx context.Context) error
- func (p *MetricsPipeline) ExecuteSync(ctx context.Context) []error
- func (p *MetricsPipeline) Shutdown(ctx context.Context) error
- func (p *MetricsPipeline) Start(ctx context.Context, wg *sync.WaitGroup) error
- type MetricsReceiver
- type Pipeline
- type ProcessorFunc
- type ProcessorList
- type ProcessorListNode
- type Receiver
- type ReceiverAdapter
- type ReceiverFunc
- type SimpleReceiver
- func (r *SimpleReceiver) GetId() string
- func (s *SimpleReceiver) PollEvents(ctx context.Context, out chan<- model.Event) error
- func (s *SimpleReceiver) PollLogs(ctx context.Context, out chan<- model.Log) error
- func (s *SimpleReceiver) PollMetrics(ctx context.Context, metricChan chan<- model.Metric) error
Constants ¶
View Source
const ( DEFAULT_HARVEST_TIME = 60 DEFAULT_ITEMS_PER_BATCH = 500 DEFAULT_MAX_EXPORT_WORKERS = 2 )
Variables ¶
This section is empty.
Functions ¶
func WithAuthenticator ¶
func WithAuthenticator( authenticator connectors.HttpAuthenticator, ) simpleReceiverOpt
func WithEventsDecoder ¶
func WithEventsDecoder(decoder EventsDecoderFunc) simpleReceiverOpt
func WithHeaders ¶
func WithLogsDecoder ¶
func WithLogsDecoder(decoder LogsDecoderFunc) simpleReceiverOpt
func WithMethod ¶
func WithMethod(method string) simpleReceiverOpt
func WithMetricsDecoder ¶
func WithMetricsDecoder(decoder MetricsDecoderFunc) simpleReceiverOpt
func WithTimeout ¶
Types ¶
type EventsDecoderFunc ¶
type EventsDecoderFunc func( receiver EventsReceiver, in io.ReadCloser, out chan<- model.Event, ) error
type EventsExporter ¶
type EventsPipeline ¶
func NewEventsPipeline ¶
func NewEventsPipeline() *EventsPipeline
func (*EventsPipeline) AddExporter ¶
func (p *EventsPipeline) AddExporter(exporter EventsExporter)
func (*EventsPipeline) AddProcessor ¶
func (p *EventsPipeline) AddProcessor(processor ProcessorFunc[model.Event])
func (*EventsPipeline) AddReceiver ¶
func (p *EventsPipeline) AddReceiver(receiver EventsReceiver)
func (*EventsPipeline) ExecuteSync ¶
func (p *EventsPipeline) ExecuteSync(ctx context.Context) []error
type EventsReceiver ¶
type ExporterAdapter ¶
type ExporterAdapter[T interface{}] struct {
// contains filtered or unexported fields
}
func NewExporterAdapter ¶
func NewExporterAdapter[T interface{}]( id string, exporter ExporterFunc[T], ) *ExporterAdapter[T]
func (*ExporterAdapter[T]) Export ¶
func (r *ExporterAdapter[T]) Export(ctx context.Context, data []T) error
func (*ExporterAdapter[T]) GetId ¶
func (r *ExporterAdapter[T]) GetId() string
type ExporterFunc ¶
type LogsDecoderFunc ¶
type LogsDecoderFunc func( receiver LogsReceiver, in io.ReadCloser, out chan<- model.Log, ) error
type LogsExporter ¶
type LogsPipeline ¶
func NewLogsPipeline ¶
func NewLogsPipeline() *LogsPipeline
func (*LogsPipeline) AddExporter ¶
func (p *LogsPipeline) AddExporter(exporter LogsExporter)
func (*LogsPipeline) AddProcessor ¶
func (p *LogsPipeline) AddProcessor(processor ProcessorFunc[model.Log])
func (*LogsPipeline) AddReceiver ¶
func (p *LogsPipeline) AddReceiver(receiver LogsReceiver)
func (*LogsPipeline) ExecuteSync ¶
func (p *LogsPipeline) ExecuteSync(ctx context.Context) []error
type LogsReceiver ¶
type MetricsDecoderFunc ¶
type MetricsDecoderFunc func( receiver MetricsReceiver, in io.ReadCloser, out chan<- model.Metric, ) error
type MetricsExporter ¶
type MetricsPipeline ¶
func NewMetricsPipeline ¶
func NewMetricsPipeline() *MetricsPipeline
func (*MetricsPipeline) AddExporter ¶
func (p *MetricsPipeline) AddExporter(exporter MetricsExporter)
func (*MetricsPipeline) AddProcessor ¶
func (p *MetricsPipeline) AddProcessor(processor ProcessorFunc[model.Metric])
func (*MetricsPipeline) AddReceiver ¶
func (p *MetricsPipeline) AddReceiver(receiver MetricsReceiver)
func (*MetricsPipeline) ExecuteSync ¶
func (p *MetricsPipeline) ExecuteSync(ctx context.Context) []error
type MetricsReceiver ¶
type ProcessorFunc ¶
type ProcessorList ¶
type ProcessorList[T any] struct { // contains filtered or unexported fields }
func (*ProcessorList[T]) AddProcessor ¶
func (pl *ProcessorList[T]) AddProcessor(processor ProcessorFunc[T])
func (*ProcessorList[T]) Process ¶
func (mpl *ProcessorList[T]) Process(data []T) ([]T, error)
type ProcessorListNode ¶
type ProcessorListNode[T any] struct { // contains filtered or unexported fields }
func (*ProcessorListNode[T]) Process ¶
func (pln *ProcessorListNode[T]) Process(data []T) ([]T, error)
type ReceiverAdapter ¶
type ReceiverAdapter[T interface{}] struct {
// contains filtered or unexported fields
}
func NewReceiverAdapter ¶
func NewReceiverAdapter[T interface{}]( id string, poller ReceiverFunc[T], ) *ReceiverAdapter[T]
func (*ReceiverAdapter[T]) GetId ¶
func (r *ReceiverAdapter[T]) GetId() string
type ReceiverFunc ¶
type SimpleReceiver ¶
type SimpleReceiver struct {
// contains filtered or unexported fields
}
func NewSimpleReceiver ¶
func NewSimpleReceiver( id string, url string, simpleReceiverOpts ...simpleReceiverOpt, ) *SimpleReceiver
func (*SimpleReceiver) GetId ¶
func (r *SimpleReceiver) GetId() string
func (*SimpleReceiver) PollEvents ¶
func (*SimpleReceiver) PollMetrics ¶
Click to show internal directories.
Click to hide internal directories.