lib

package
v0.0.0-...-35f467a Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2023 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DebugWriter = ioutil.Discard

Functions

This section is empty.

Types

type DumpCommand

type DumpCommand struct {
	Index        string    `required help:"Index filter" short:"i"`
	QueryString  string    `help:"Query string to filter results" short:"q"`
	Size         string    `help:"Bulk size" default:"100" short:"s"`
	OutputFile   string    `help:"Output file" short:"o"`
	ScrollId     string    `help:"Scroll ID used to resume a dump" default:"" short:"S"`
	OutputWriter io.Writer `kong:"-"`
}

func (*DumpCommand) Run

func (cmd *DumpCommand) Run(dispatcher *EsQueryDispatcher) (err error)

type EsGreetReply

type EsGreetReply struct {
	Name        string `json:"name"`
	ClusterName string `json:"cluster_name"`
	Version     struct {
		Number string `json:"number"`
	} `json:"version"`
}

type EsQueryDispatcher

type EsQueryDispatcher struct {
	Product              string
	Major                int
	ElasticsearchVersion string
	KibanaVersion        string
	BaseUrl              string
	LogOutput            io.Writer
}

func (*EsQueryDispatcher) DetectEsVersion

func (disaptcher *EsQueryDispatcher) DetectEsVersion() (err error)

func (*EsQueryDispatcher) ESRequest

func (disaptcher *EsQueryDispatcher) ESRequest(method, path string, target interface{}, body interface{}) (error, *http.Response)

func (*EsQueryDispatcher) GetJSONObject

func (disaptcher *EsQueryDispatcher) GetJSONObject(url string, target interface{}) (err error, response *http.Response)

func (*EsQueryDispatcher) PostJsonObject

func (disaptcher *EsQueryDispatcher) PostJsonObject(url string, target interface{}, body interface{}) (err error, response *http.Response)

type IndexInfo

type IndexInfo struct {
	Health    string `json:"health"`
	Index     string `json:"index"`
	DocCount  string `json:"docs.count"`
	StoreSize string `json:"pri.store.size"`
}

type LsCommand

type LsCommand struct {
}

func (*LsCommand) Run

func (cmd *LsCommand) Run(dispatcher *EsQueryDispatcher) (err error)

type ScrollRequest

type ScrollRequest struct {
	Size string `json:"size"`
	Sort string `json:"sort"`
}

type ScrollResponse

type ScrollResponse struct {
	Scroll   string `json:"scroll"`
	ScrollId string `json:"_scroll_id"`
	Hits     struct {
		Total interface{}   `json:"total"`
		Hits  []interface{} `json:"hits"`
	} `json:"hits"`
}

type ScrollResume

type ScrollResume struct {
	Scroll   string `json:"scroll"`
	ScrollId string `json:"scroll_id"`
}

Jump to

Keyboard shortcuts

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