bulk

package
v0.0.0-...-ab08451 Latest Latest
Warning

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

Go to latest
Published: May 29, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bulk

type Bulk struct {
	Metadata interface{} `json:",inline"`
	Source   []byte      `json:",inline"`
}

Bulk is the internal representation of a elastic search bulk request.

func (*Bulk) Marshal

func (b *Bulk) Marshal() ([]byte, error)

Marshal creates an elastic search bulk json of its metadata and sources and returns a list of bulk files with a max size of 50mb

type BulkList

type BulkList []*Bulk

BulkList is a list of bulks

func NewList

func NewList(meta interface{}, sources [][]byte) BulkList

NewList creates a list of Bulks with the same metadata

func ParseExportedFiles

func ParseExportedFiles(log logr.Logger, name string, stepMeta interface{}, docs []byte) BulkList

ParseExportedFiles reads jsondocuments line by line from an expected file where multiple jsons are separated by newline.

func (BulkList) Marshal

func (l BulkList) Marshal() ([][]byte, error)

type ESIndex

type ESIndex struct {
	Index string `json:"_index,omitempty"`
	Type  string `json:"_type,omitempty"`
}

ESIndex is the elastic search index where the bulk data is stored.

type ESMetadata

type ESMetadata struct {
	Index ESIndex `json:"index,omitempty"`
}

ESMetadata is the metadata of a bulk document.

Jump to

Keyboard shortcuts

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