Documentation ¶
Overview ¶
Package config allows parsing a configuration for Elasticsearch from a URL.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { URL string Index string Username string Password string Shards int Replicas int Sniff *bool Healthcheck *bool Infolog string Errorlog string Tracelog string }
Config represents an Elasticsearch configuration.
func Parse ¶
Parse returns the Elasticsearch configuration by extracting it from the URL, its path, and its query string.
Example:
http://127.0.0.1:9200/store-blobs?shards=1&replicas=0&sniff=false&tracelog=elastic.trace.log
The code above will return a URL of http://127.0.0.1:9200, an index name of store-blobs, and the related settings from the query string.
Click to show internal directories.
Click to hide internal directories.