output

package
v0.0.0-...-456f7df Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 1, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConsoleLog

func ConsoleLog(prefix string, dfchan chan *datarecord.DataFrame)

func NewElasticClient

func NewElasticClient(url string) (*elastic.Client, error)

NewElasticClient is a construct function for Client

func RecordMap

func RecordMap(d *datarecord.DataFrame)

func RecordMapWithPrediction

func RecordMapWithPrediction(d *datarecord.DataFrame, g *geoipmap.GeoIPCollector)

func RecordStreamProccesor

func RecordStreamProccesor(dfchan chan *datarecord.DataFrame, fanoutList []chan *datarecord.DataFrame)

RecordStreamProccesor : stream process worker....

Types

type ElasticBulkProcessor

type ElasticBulkProcessor struct {
	C             *elastic.Client
	P             *elastic.BulkProcessor
	Workers       int
	IndexPrefix   string
	FlushInterval int
	StopC         chan struct{} // stop channel for caller
	CreateIdxFlag chan struct{}
}

ElasticBulkProcessor elastic bulk import processor

func ElasticBulkImportProcessor

func ElasticBulkImportProcessor(url string, numWorkers int, indexPrefix string, FlushInterval int) (*ElasticBulkProcessor, error)

ElasticImport :Bulk import record to ElasticSearch

func (*ElasticBulkProcessor) Close

func (b *ElasticBulkProcessor) Close() error

Close the bulker.

func (*ElasticBulkProcessor) ElasticRecordProcessor

func (b *ElasticBulkProcessor) ElasticRecordProcessor(dfchan chan *datarecord.DataFrame)

ElasticRecordProcessor is used bulkupload Record to ElasticSearch Server

func (*ElasticBulkProcessor) Run

func (b *ElasticBulkProcessor) Run() error

Run starts the ElasticBulkProcessor.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL