elasticsearch

package
v1.41.1 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckESConnection

func CheckESConnection(es EsConnection) error

CheckESConnection checs if the connection to ElasticSearch can be done es: connection details to the ElasticSearch database

func FormatEsIndices

func FormatEsIndices(esIndices []EsIndex, prefix, postfix string) string

FormatEsIndices formats the ES Indices information to print it or something esIndices: indices to format prefix: a prefix for each ES index postfix: a postfix for each ES index

Types

type EsConnection

type EsConnection struct {
	Port        string
	URL         string
	Namespace   string
	Certificate tls.Certificate
	RootCAs     *x509.CertPool
}

EsConnection details to the ElasticSearch database

func (*EsConnection) LoadCertificate added in v1.32.0

func (connection *EsConnection) LoadCertificate(secretPath string) error

LoadCertificate loads the certificates to authenticate in the connection. secretPath: path to the folder where the secrets are located.

func (*EsConnection) PrettyString

func (connection *EsConnection) PrettyString(callback func(args ...interface{}))

PrettyString prints the ES connection details in a nice way callback: function to use to print the information

type EsIndex

type EsIndex struct {
	Index string `json:"index"`
	// contains filtered or unexported fields
}

EsIndex maps indices data from ES REST API response API endpoint: /_cat/indices?format=json

func GetEsIndex

func GetEsIndex(es EsConnection, indexName string) EsIndex

GetEsIndex gets information from an specific ElasticSearch index es: connection details to the ElasticSearch database indexName: name of the index

func GetEsIndices

func GetEsIndices(es EsConnection) ([]EsIndex, error)

GetEsIndices returns the indices from the ElasticSearch node es: connection details to the ElasticSearch database

func (*EsIndex) GetIndexSpans

func (index *EsIndex) GetIndexSpans() ([]EsSpan, error)

GetIndexSpans gets the spans associated to one index

func (*EsIndex) GetServiceIndexSpans

func (index *EsIndex) GetServiceIndexSpans(serviceName string) ([]EsSpan, error)

GetServiceIndexSpans gets the spans associated to one index and one service serviceName: name of the Jaeger service

type EsSpan

type EsSpan struct {
	ID            string
	ServiceName   string
	OperationName string
}

EsSpan maps spans data from ES REST API response API endpoint: /<index>/_search?format=json

Jump to

Keyboard shortcuts

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