es

package
v0.0.0-...-59331fc Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2026 License: GPL-3.0 Imports: 59 Imported by: 0

Documentation

Overview

Copyright © 2026 Thomas von Dein

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

Index

Constants

View Source
const (
	ResponseHealth = iota
	ResponseInfo
	ResponseCcr
	ResponseStats
	ResponseIndices
	ResponseTasks
	ResponseExplain
	ResponseLifecycle
	ResponseHealthReport
)
View Source
const (
	Rindexname = iota
	Rrole
	Rindexprivilege
	Rclusterprivilege
	Radgroup
	Rspace
	Rretention
	Rkibanaprivilege
	Rfieldprivilege
)

use static csv record positions as const vars so we can modify it if the csv format ever changes

View Source
const (
	Fmust = iota
	Fmustnot
	Fshould
)
View Source
const (
	DefaultExclude = `(part|monitoring|.internal|metrics-endpoint)`
)
View Source
const (
	MAXPAGE = 5000
)

Variables

View Source
var (
	IlmPhaseOrder = []string{"hot", "warm", "cold", "frozen", "delete"}
)

Functions

func ApiList

func ApiList(conf *cfg.Config, pattern string) error

func ApiPathNames

func ApiPathNames() []string

for completion

func ApiRepl

func ApiRepl(conf *cfg.Config) error

func ApiShow

func ApiShow(conf *cfg.Config, showpath, verb string) error

func CallAPI

func CallAPI(conf *cfg.Config, verb, path, data string) ([]byte, error)

func CcrFollowerAdd

func CcrFollowerAdd(conf *cfg.Config, index string) error

func CcrFollowerPause

func CcrFollowerPause(conf *cfg.Config, index string) error

func CcrFollowerRenew

func CcrFollowerRenew(conf *cfg.Config, index string) error

func CcrFollowerResume

func CcrFollowerResume(conf *cfg.Config, index string) error

func CcrFollowerShow

func CcrFollowerShow(conf *cfg.Config, index string) error

func CcrFollowerUnfollow

func CcrFollowerUnfollow(conf *cfg.Config, index string) error

func CcrRemoteInfo

func CcrRemoteInfo(conf *cfg.Config, index string) error

func CcrShardPause

func CcrShardPause(conf *cfg.Config) error

func CcrShardResume

func CcrShardResume(conf *cfg.Config) error

func CcrStatus

func CcrStatus(conf *cfg.Config, leader, follower string) error

func ClusterList

func ClusterList(conf *cfg.Config) error

func ClusterRerouteAllocatePrimary

func ClusterRerouteAllocatePrimary(conf *cfg.Config, index string, stale bool) error

func ClusterRerouteAllocateReplica

func ClusterRerouteAllocateReplica(conf *cfg.Config, index string) error

func ClusterRerouteCancel

func ClusterRerouteCancel(conf *cfg.Config, index string) error

func ClusterRerouteMove

func ClusterRerouteMove(conf *cfg.Config, index string) error

func ClusterSettingsList

func ClusterSettingsList(conf *cfg.Config) error

func ClusterSettingsNames

func ClusterSettingsNames(conf *cfg.Config) ([]string, error)

func ClusterSettingsSet

func ClusterSettingsSet(conf *cfg.Config, args cli.Args) error

func ClusterSettingsSetSingle

func ClusterSettingsSetSingle(conf *cfg.Config, setting, value string) error

func ClusterStatus

func ClusterStatus(conf *cfg.Config) error

func DatastreamCreate

func DatastreamCreate(conf *cfg.Config, dsname string) error

func DatastreamDelete

func DatastreamDelete(conf *cfg.Config, dsname string) error

func DatastreamList

func DatastreamList(conf *cfg.Config) error

func DatastreamNames

func DatastreamNames(conf *cfg.Config) ([]string, error)

func DatastreamRollover

func DatastreamRollover(conf *cfg.Config, ds string) error

func DatastreamShow

func DatastreamShow(conf *cfg.Config, dsname string) error

func Debug

func Debug(conf *cfg.Config) error

func DocAdd

func DocAdd(conf *cfg.Config, jsondoc string) error

create index with:

esctl index create foo [id:keyword user:text age:integer]

then add a doc:

esctl doc add foo2 '{"id":"d8d8d","user":"scip"}'

func DocDelete

func DocDelete(conf *cfg.Config, queries []string) error

func DocShow

func DocShow(conf *cfg.Config, id string) error

func IlmCreate

func IlmCreate(conf *cfg.Config, policyname string) error

func IlmExplain

func IlmExplain(conf *cfg.Config, index string) error

func IlmForecastList

func IlmForecastList(conf *cfg.Config, filter string) error

func IlmForecastShow

func IlmForecastShow(conf *cfg.Config) error

Loop over all current index phases of the current phase (conf.Ilm.FromPhase). Calculate virtualAge if phase.minsize >0. If the actual age is smaller than the virtual age, use this as a base, otherwise use virtual age. Then look if the rollover would happen within the phase.minage window (conf.Ilm.Within + current age) and add the size.

func IlmList

func IlmList(conf *cfg.Config, pattern string) error

func IlmNames

func IlmNames(conf *cfg.Config) ([]string, error)

func IlmRetry

func IlmRetry(conf *cfg.Config, index string) error

func IlmShow

func IlmShow(conf *cfg.Config, policy string) error

func IlmShowTree

func IlmShowTree(conf *cfg.Config, ilm types.IlmPolicy) error

Visualize phases or a ILM policy, taking into account that the minAge for the current phases is set in the next phase

func IlmStatus

func IlmStatus(conf *cfg.Config) error

func IndexAliasCreate

func IndexAliasCreate(conf *cfg.Config, index, alias string) error

FIXME: add filter support, see IndexCreate mapping

func IndexAliasDelete

func IndexAliasDelete(conf *cfg.Config, index, alias string) error

func IndexAliasList

func IndexAliasList(conf *cfg.Config) error

func IndexAliasRollover

func IndexAliasRollover(conf *cfg.Config, alias string) error

func IndexClose

func IndexClose(conf *cfg.Config, index string) error

func IndexCopy

func IndexCopy(conf *cfg.Config) error

func IndexCreate

func IndexCreate(conf *cfg.Config, index string, mappings []string) error

func IndexDelete

func IndexDelete(conf *cfg.Config, index string) error

func IndexDiskusage

func IndexDiskusage(conf *cfg.Config, index string) error

func IndexFields

func IndexFields(conf *cfg.Config, index string) error

func IndexList

func IndexList(conf *cfg.Config) error

func IndexNames

func IndexNames(conf *cfg.Config) ([]string, error)

used for completion

func IndexShow

func IndexShow(conf *cfg.Config, indexpattern string) error

func IndexTemplateCreate

func IndexTemplateCreate(conf *cfg.Config, name string, mappings []string) error

func IndexTemplateDelete

func IndexTemplateDelete(conf *cfg.Config, name string) error

func IndexTemplateList

func IndexTemplateList(conf *cfg.Config, filter string) error

func IndexTemplateModify

func IndexTemplateModify(conf *cfg.Config, name string, mappings []string) error

FIXME: func's too long, refactor FIXME: it's not yet possible to remove items in lists (aliases, mappings, settings), just overwrite them

func IndexTemplateNames

func IndexTemplateNames(conf *cfg.Config) ([]string, error)

used for completion

func IndexTemplateShow

func IndexTemplateShow(conf *cfg.Config, tplname string) error

func LicenseShow

func LicenseShow(conf *cfg.Config) error

func NewFilter

func NewFilter(query string) (*filter, error)

Build a new filter object. We use this to build our elastic query out of it. We support different types of queries:

  • nop filter: no query at all, just return the first N documents.

  • simple ones like: "authenticated", which match across all fields

  • simple ones combined like "authenticated monitoring", if -O was set, apply an OR logic

  • specific field queries: "message=authenticated" (can be combined too like above)

  • and specific field queries with negation: "message!=authenticated"

All queries support additional filters using -F field=value, which must match literally, and range filters using -r "@timestamp:2026-05-28T10:00:00 to now"

func NodeClients

func NodeClients(conf *cfg.Config, nodename string) error

func NodeList

func NodeList(conf *cfg.Config) error

func NodeNames

func NodeNames(conf *cfg.Config) ([]string, error)

func NodeShow

func NodeShow(conf *cfg.Config, nodename string) error

FIXME: adding the settings metric leads to json unmarshall error: https://github.com/elastic/go-elasticsearch/issues/1524

func NodeUsage

func NodeUsage(conf *cfg.Config, nodeid string) error

func RoleDiff

func RoleDiff(conf *cfg.Config, csvfile, role string) error

func RoleDiffSingle

func RoleDiffSingle(conf *cfg.Config, csvfile, rolename string) error

func RoleList

func RoleList(conf *cfg.Config) error

func RoleNames

func RoleNames(conf *cfg.Config) ([]string, error)

func RoleShow

func RoleShow(conf *cfg.Config, rolename string) error

func RolloverAlias

func RolloverAlias(conf *cfg.Config, alias string) (*rollover.Response, error)

func RolloverConditions

func RolloverConditions(conf *cfg.Config) types.RolloverConditionsVariant
func Search(conf *cfg.Config, queries []string) error

Execute an ES search.

q is the actual search query given as arg to the 'search' cmd
additional filters can be given as -F key=value

func SearchQL

func SearchQL(conf *cfg.Config, querystring string) error

func ShardAllocation

func ShardAllocation(conf *cfg.Config, index string) error

func ShardList

func ShardList(conf *cfg.Config) error

func ShardShow

func ShardShow(conf *cfg.Config, index string) error

func SnapshotList

func SnapshotList(conf *cfg.Config) error

func SnapshotShow

func SnapshotShow(conf *cfg.Config, snapshot string) error

func TaskCancel

func TaskCancel(conf *cfg.Config, taskid string) error

func TaskList

func TaskList(conf *cfg.Config) error

Types

type ClusterIndices

type ClusterIndices map[string]map[string]*types.IndicesRecord

type Diskusage

type Diskusage struct {
	Total       int64 `json:"total_in_bytes"`
	Points      int64 `json:"points_in_bytes"`
	Norms       int64 `json:"norms_in_bytes"`
	TermVectors int64 `json:"term_vectors_in_bytes"`
	KnnVectors  int64 `json:"knn_vectors_in_bytes"`
	BloomFilter int64 `json:"bloom_filter_in_bytes"`
}

type HealthReport

type HealthReport struct {
	Indicators map[string]HealthReportIndicator
}

type HealthReportDiagnosis

type HealthReportDiagnosis struct {
	Id, Cause, Action string
	AffectedResources map[string][]string `json:"affected_resources"`
}

type HealthReportIndicator

type HealthReportIndicator struct {
	Status, Symptom string
	Diagnosis       []HealthReportDiagnosis
}

type IndexDiskUsage

type IndexDiskUsage struct {
	AllFields Diskusage            `json:"all_fields"`
	Fields    map[string]Diskusage `json:"fields"`
}

type NextPhase

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

type Op

type Op struct {
	Verb string
	Op   *spec.Operation
}

holds an API operation via go-openapi/spec

type Param

type Param struct {
	Description, Param string
}

type Params

type Params struct {
	Path  []Param
	Query []Param
}

API operation parameter type

type PhaseData

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

type Record

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

type Register

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

type ResIndexDiskUsage

type ResIndexDiskUsage map[string]IndexDiskUsage

type Snapshot

type Snapshot struct {
	Name       string
	Forindex   string
	Orphaned   string
	Status     string
	Start      string
	IndexCount int
}

type Tpl

type Tpl struct {
	IndexTemplates []TplTpl `json:"index_templates"`
}

type TplTemplate

type TplTemplate struct {
	Template TplTemplateData `json:"template"`
}

type TplTemplateData

type TplTemplateData struct {
	Settings  map[string]any `json:"settings"`
	Aliases   map[string]any `json:"aliases"`
	Lifecycle map[string]any `json:"lifecycle"`
	Mappings  map[string]any `json:"mappings"`
}

type TplTpl

type TplTpl struct {
	IndexTemplate TplTemplate `json:"index_template"`
}

Jump to

Keyboard shortcuts

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