elasticsearchwriter

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2025 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultBatchSize   = 1024
	DefaultTimeout     = 600
	DefaultTrySize     = 30
	DefaultTryInterval = 60000
	DefaultSplitter    = "-,-"
	DefaultActionType  = "index"
	DefaultESVersion   = 7
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ActionType

type ActionType string

ActionType 操作类型枚举

const (
	ActionTypeIndex  ActionType = "index"
	ActionTypeCreate ActionType = "create"
	ActionTypeDelete ActionType = "delete"
	ActionTypeUpdate ActionType = "update"
)

type ESColumn

type ESColumn struct {
	Name                        string   `json:"name"`
	Type                        string   `json:"type"`
	Array                       bool     `json:"array"`
	DstArray                    bool     `json:"dstArray"`
	JsonArray                   bool     `json:"json_array"`
	CombineFields               []string `json:"combineFields"`
	CombineFieldsValueSeparator string   `json:"combineFieldsValueSeparator"`
	Format                      string   `json:"format"`
	Timezone                    string   `json:"timezone"`
	Origin                      bool     `json:"origin"`
}

ESColumn ElasticSearch列配置

type ESFieldType

type ESFieldType string

ESFieldType ElasticSearch字段类型

const (
	FieldTypeID           ESFieldType = "id"
	FieldTypeVersion      ESFieldType = "version"
	FieldTypeRouting      ESFieldType = "routing"
	FieldTypeParent       ESFieldType = "parent"
	FieldTypeString       ESFieldType = "string"
	FieldTypeKeyword      ESFieldType = "keyword"
	FieldTypeText         ESFieldType = "text"
	FieldTypeDate         ESFieldType = "date"
	FieldTypeLong         ESFieldType = "long"
	FieldTypeInteger      ESFieldType = "integer"
	FieldTypeShort        ESFieldType = "short"
	FieldTypeByte         ESFieldType = "byte"
	FieldTypeDouble       ESFieldType = "double"
	FieldTypeFloat        ESFieldType = "float"
	FieldTypeBoolean      ESFieldType = "boolean"
	FieldTypeBinary       ESFieldType = "binary"
	FieldTypeObject       ESFieldType = "object"
	FieldTypeNested       ESFieldType = "nested"
	FieldTypeGeoPoint     ESFieldType = "geo_point"
	FieldTypeGeoShape     ESFieldType = "geo_shape"
	FieldTypeIP           ESFieldType = "ip"
	FieldTypeIPRange      ESFieldType = "ip_range"
	FieldTypeDateRange    ESFieldType = "date_range"
	FieldTypeIntegerRange ESFieldType = "integer_range"
	FieldTypeFloatRange   ESFieldType = "float_range"
	FieldTypeLongRange    ESFieldType = "long_range"
	FieldTypeDoubleRange  ESFieldType = "double_range"
)

type ElasticSearchWriterJob

type ElasticSearchWriterJob struct {
	// contains filtered or unexported fields
}

ElasticSearchWriterJob ElasticSearch写入作业

func NewElasticSearchWriterJob

func NewElasticSearchWriterJob() *ElasticSearchWriterJob

func (*ElasticSearchWriterJob) Destroy

func (job *ElasticSearchWriterJob) Destroy() error

func (*ElasticSearchWriterJob) Init

func (*ElasticSearchWriterJob) Post

func (job *ElasticSearchWriterJob) Post() error

func (*ElasticSearchWriterJob) Prepare

func (job *ElasticSearchWriterJob) Prepare() error

func (*ElasticSearchWriterJob) Split

func (job *ElasticSearchWriterJob) Split(adviceNumber int) ([]config.Configuration, error)

type ElasticSearchWriterJobFactory

type ElasticSearchWriterJobFactory struct{}

ElasticSearchWriterJobFactory 实现WriterJobFactory接口

func (*ElasticSearchWriterJobFactory) CreateWriterJob

func (f *ElasticSearchWriterJobFactory) CreateWriterJob() plugin.WriterJob

type ElasticSearchWriterTask

type ElasticSearchWriterTask struct {
	// contains filtered or unexported fields
}

ElasticSearchWriterTask ElasticSearch写入任务

func NewElasticSearchWriterTask

func NewElasticSearchWriterTask() *ElasticSearchWriterTask

func (*ElasticSearchWriterTask) Destroy

func (task *ElasticSearchWriterTask) Destroy() error

func (*ElasticSearchWriterTask) Init

func (*ElasticSearchWriterTask) Post

func (task *ElasticSearchWriterTask) Post() error

func (*ElasticSearchWriterTask) Prepare

func (task *ElasticSearchWriterTask) Prepare() error

func (*ElasticSearchWriterTask) StartWrite

func (task *ElasticSearchWriterTask) StartWrite(recordReceiver plugin.RecordReceiver) error

type ElasticSearchWriterTaskFactory

type ElasticSearchWriterTaskFactory struct{}

ElasticSearchWriterTaskFactory 实现WriterTaskFactory接口

func (*ElasticSearchWriterTaskFactory) CreateWriterTask

func (f *ElasticSearchWriterTaskFactory) CreateWriterTask() plugin.WriterTask

type PartitionColumn

type PartitionColumn struct {
	Name string `json:"name"`
}

PartitionColumn 分区列配置

type PrimaryKeyInfo

type PrimaryKeyInfo struct {
	Column         []string `json:"column"`
	FieldDelimiter string   `json:"fieldDelimiter"`
}

PrimaryKeyInfo 主键信息配置

Jump to

Keyboard shortcuts

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