es

package module
v0.0.0-...-7193066 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BulkCfg

type BulkCfg struct {
	BulkActions int `yaml:"bulk_actions" json:"bulk_actions"`
	Workers     int `yaml:"workers" json:"workers"`
}

type ESWriter

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

func NewEsWriter

func NewEsWriter(name string, cfg *EsCfg) (*ESWriter, error)

func (*ESWriter) Add

func (w *ESWriter) Add(doc interface{}, indexs ...string)

func (*ESWriter) Close

func (w *ESWriter) Close() error

func (*ESWriter) SetIndex

func (w *ESWriter) SetIndex(index string)

type EsCfg

type EsCfg struct {
	Addr     string  `yaml:"addr" json:"addr"`
	User     string  `yaml:"user" json:"user"`
	Password string  `yaml:"password" json:"password"`
	Index    string  `yaml:"index" json:"index"`
	BulkCfg  BulkCfg `yaml:"bulk_cfg" json:"bulk_cfg"`
}

Jump to

Keyboard shortcuts

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