Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrInconsistentNodes = errors.New("got inconsistent nodes from Elasticsearch")
ErrInconsistentNodes is returned when ElasticsearchQueryService.Nodes() gets different sets of nodes from Elasticsearch across API calls.
Functions ¶
This section is empty.
Types ¶
type ElasticsearchCommandService ¶
type ElasticsearchCommandService struct {
// contains filtered or unexported fields
}
ElasticsearchCommandService implements methods that write to Elasticsearch endpoints.
func NewElasticsearchCommandService ¶
func NewElasticsearchCommandService(client *elastic.Client) *ElasticsearchCommandService
NewElasticsearchCommandService returns a new ElasticsearchCommandService.
func (*ElasticsearchCommandService) Drain ¶
func (s *ElasticsearchCommandService) Drain(ctx context.Context, nodeName string) error
Drain excludes a node from shard allocation, which will cause Elasticsearch to remove shards from the node until empty.
See: https://www.elastic.co/guide/en/elasticsearch/reference/7.0/allocation-filtering.html
func (*ElasticsearchCommandService) Undrain ¶
func (s *ElasticsearchCommandService) Undrain(ctx context.Context, nodeName string) error
Undrain reverses Drain.
See: https://www.elastic.co/guide/en/elasticsearch/reference/7.0/allocation-filtering.html
type ElasticsearchQueryService ¶
type ElasticsearchQueryService struct {
// contains filtered or unexported fields
}
ElasticsearchQueryService implements methods that read from Elasticsearch endpoints.
func NewElasticsearchQueryService ¶
func NewElasticsearchQueryService(client *elastic.Client) *ElasticsearchQueryService
NewElasticsearchQueryService returns a new ElasticsearchQueryService.
func (*ElasticsearchQueryService) Node ¶
Node returns a single node with the given name. Will return nil if the node doesn't exist.
func (*ElasticsearchQueryService) Nodes ¶
func (s *ElasticsearchQueryService) Nodes(ctx context.Context, names ...string) (map[string]*Node, error)
Nodes returns info and stats about the nodes in the Elasticsearch cluster, as a map from node name to Node. If names are past, limit to nodes with those names. It's left up to the caller to check if all the names are in the response.
type Node ¶
type Node struct { elastic.NodesInfoNode ClusterName string ElectedMaster bool ExcludedShardAllocation bool Stats elastic.NodesStatsNode Shards es.CatShardsResponse }
Node represents info and stats about an Elasticsearch node at a point in time.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
pkg
|
|
es
Package es implements additional services that are missing from https://github.com/olivere/elastic .
|
Package es implements additional services that are missing from https://github.com/olivere/elastic . |
es/health
Package health implements Elasticsearch healthchecks (using https://github.com/heptiolabs/healthcheck) to check the liveness and readiness of an Elasticsearch node.
|
Package health implements Elasticsearch healthchecks (using https://github.com/heptiolabs/healthcheck) to check the liveness and readiness of an Elasticsearch node. |
lifecycle
Package lifecycle impelmments unmarshaling of AWS Autoscaling Group Lifecycle Hook event messages, and provides a function KeepAlive() that will keep an event in the Transition:Wait state until a function returns true.
|
Package lifecycle impelmments unmarshaling of AWS Autoscaling Group Lifecycle Hook event messages, and provides a function KeepAlive() that will keep an event in the Transition:Wait state until a function returns true. |
squeues
Package squeues implements a concurrent dispatcher for AWS SQS queue messages.
|
Package squeues implements a concurrent dispatcher for AWS SQS queue messages. |
str
Package str contains string utilities.
|
Package str contains string utilities. |
time
Package time implements time stuff.
|
Package time implements time stuff. |