Documentation ¶
Index ¶
- func Count(conn Connection, index, eventType string) uint64
- func DeleteAPMEvents(conn Connection) (int, error)
- func FetchReports(conn Connection, body interface{}) ([]models.Report, error)
- func IndexReport(conn Connection, report models.Report) error
- type ActualHit
- type Connection
- type Hits
- type SearchResult
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 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 SearchResult ¶
type SearchResult struct {
Hits Hits `json:"hits"`
}
Click to show internal directories.
Click to hide internal directories.