elasticsearch

package
v0.0.0-...-f845abb Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LevelCluster clusterHealthLevel = "cluster"
	LevelIndices clusterHealthLevel = "indices"
	LevelShards  clusterHealthLevel = "shards"
)

Cluster health levels

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	ClusterHealth(level clusterHealthLevel) (*model.ClusterHealth, error)
	Aliases() (model.Aliases, error)
	Indices() (*model.Indices, error)
	Nodes(fetchAllNodesInfo bool) (*model.Nodes, error)
	Recovery() (model.Recovery, error)
	Tasks() (*model.Tasks, error)
}

Client is an ElasticSearch client interface

type ClientMock

type ClientMock struct {
	ClusterHealthCallback func(level clusterHealthLevel) (*model.ClusterHealth, error)
	AliasesCallback       func() (model.Aliases, error)
	IndicesCallback       func() (*model.Indices, error)
	NodesCallback         func(fetchAllNodesInfo bool) (*model.Nodes, error)
}

ClientMock is a client mock implementation

type ESClient

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

Client is an ElasticSearch client implementation

func NewClient

func NewClient(httpClient httpclient.Client) *ESClient

NewClient returns new client

func (*ESClient) Aliases

func (c *ESClient) Aliases() (model.Aliases, error)

Aliases returns ES index aliases info

func (*ESClient) ClusterHealth

func (c *ESClient) ClusterHealth(level clusterHealthLevel) (*model.ClusterHealth, error)

ClusterHealth returns ES cluster health info

func (*ESClient) Indices

func (c *ESClient) Indices() (*model.Indices, error)

Indices returns ES indices info

func (*ESClient) Nodes

func (c *ESClient) Nodes(fetchAllNodesInfo bool) (*model.Nodes, error)

Nodes returns ES nodes info

func (*ESClient) Recovery

func (c *ESClient) Recovery() (model.Recovery, error)

Recovery returns ES state with currently active recovery operations

func (*ESClient) Tasks

func (c *ESClient) Tasks() (*model.Tasks, error)

Tasks returns ES tasks info

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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