Documentation ¶
Index ¶
- Constants
- type Client
- type ClientMock
- type ESClient
- func (c *ESClient) Aliases() (model.Aliases, error)
- func (c *ESClient) ClusterHealth(level clusterHealthLevel) (*model.ClusterHealth, error)
- func (c *ESClient) Indices() (*model.Indices, error)
- func (c *ESClient) Nodes(fetchAllNodesInfo bool) (*model.Nodes, error)
- func (c *ESClient) Recovery() (model.Recovery, error)
- func (c *ESClient) Tasks() (*model.Tasks, error)
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) ClusterHealth ¶
func (c *ESClient) ClusterHealth(level clusterHealthLevel) (*model.ClusterHealth, error)
ClusterHealth returns ES cluster health info
Click to show internal directories.
Click to hide internal directories.