es

package
v0.0.0-...-f73114c Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Count

func Count(conn Connection, index, eventType string) uint64

Count returns the number of documents in the given index, excluding those related to self-instrumentation.

func DeleteAPMEvents

func DeleteAPMEvents(conn Connection) (int, error)

func FetchReports

func FetchReports(conn Connection, body interface{}) ([]models.Report, error)

FetchReports retrieves performance reports from elasticsearch.

func IndexReport

func IndexReport(conn Connection, report models.Report) error

IndexReport saves in elasticsearch a performance report.

Types

type ActualHit

type ActualHit struct {
	Id     string        `json:"_id"`
	Source models.Report `json:"_source"`
}

type Connection

type Connection struct {
	*elasticsearch.Client
	Url string
	// contains filtered or unexported fields
}

Connection holds an elasticsearch client plus URL and credentials strings

func NewConnection

func NewConnection(url, auth string) (Connection, error)

NewConnection returns a client connected to an ElasticSearch node with given `params` "local" is short for http://localhost:9200

type Hits

type Hits struct {
	Hits []ActualHit `json:"hits"`
}

type SearchResult

type SearchResult struct {
	Hits Hits `json:"hits"`
}

Jump to

Keyboard shortcuts

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