ropensci / elastic

R client for the Elasticsearch HTTP API
https://docs.ropensci.org/elastic
Other
245 stars 58 forks source link

connect: support using a config file with connection details? #243

Closed sckott closed 3 years ago

sckott commented 5 years ago

related to #87

I can see a use case for a config file with connection details for 1 or more elasticsearch instances, and then connect() pulls in that info. e.g.,

connect(file = "es_setup.yml")

where

host: some.ip.address
path: /search
transport_schema: https
user: foo
pwd: bar
errors: complete

or to support many, do

setup_one:
  host: some.ip.address
  path: /search
  transport_schema: https
  user: foo
  pwd: bar
  errors: complete
setup_two:
  host: some.other.ip.address
  path: /query
  transport_schema: http
  user: hello
  pwd: world
  errors: simple

and then call in the details you want like

connect(file = list(setup_two = "es_setup.yml"))

or some other thing, not sure 🤔

sckott commented 5 years ago

no one's asked for this, may revisit if someone asks for it