Help us shape the future of Go! Take the 2026 Go Developer Survey

client

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2026 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Client http.Client
	URLs   []*url.URL
}

func NewClient

func NewClient(urls []*url.URL, rt http.RoundTripper) *Client

func (*Client) Health

func (c *Client) Health() (*es.HealthResponse, error)

Health retrieves the Cluster's health state

func (*Client) NodeStats

func (c *Client) NodeStats() (*es.ClusterStats, error)

NodeStats retrieves the Cluster's node statistics

func (*Client) Perform added in v1.0.0

func (c *Client) Perform(req *http.Request) (*http.Response, error)

Perform wraps the Client's HTTP call so that we can try all given nodes in case one node is not reachable

func (*Client) SearchMessages

func (c *Client) SearchMessages(index string, query string, messageKey string) (uint, []string, error)

SearchMessages runs a query_string query and returns the count of documents and the requesed values via messageKey

func (*Client) Snapshot added in v0.5.0

func (c *Client) Snapshot(repository string, snapshot string) (*es.SnapshotResponse, error)

Snapshot retrieves the cluster's snapshot states

Jump to

Keyboard shortcuts

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