elasticsearchio

package
v0.0.0-...-223fbb0 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Read

func Read(
	scope beam.Scope,
	cfg ReadConfig,
	elemType reflect.Type,
) beam.PCollection

func Write

func Write(
	scope beam.Scope,
	cfg WriteConfig,
	col beam.PCollection,
)

Types

type Hit

type Hit struct {
	Source json.RawMessage `json:"_source"`
	Sort   []any           `json:"sort"`
}

type Hits

type Hits struct {
	Hits  []*Hit `json:"hits"`
	Total Total  `json:"total"`
}

type OpenPITResponse

type OpenPITResponse struct {
	ID string `json:"id"`
}

type PointInTime

type PointInTime struct {
	ID        string `json:"id"`
	KeepAlive string `json:"keep_alive"`
}

type ReadConfig

type ReadConfig struct {
	Addresses []string
	CloudID   string
	APIKey    string
	Index     string
	Query     string
	BatchSize int
	KeepAlive string
}

type SearchRequest

type SearchRequest struct {
	Query       json.RawMessage `json:"query"`
	Pit         *PointInTime    `json:"pit,omitempty"`
	SearchAfter []any           `json:"search_after,omitempty"`
}

type SearchResponse

type SearchResponse struct {
	PitID string `json:"pit_id"`
	Hits  *Hits  `json:"hits"`
}

type Total

type Total struct {
	Value int `json:"value"`
}

type WriteConfig

type WriteConfig struct {
	Addresses  []string
	CloudID    string
	APIKey     string
	Index      string
	FlushBytes int
}

Jump to

Keyboard shortcuts

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