Closed tg666 closed 2 years ago
Hi. Does it means there is not support for multiple configuration?
Ruflin/Elastica supports multiple connections. They can be defined under key connections
:
https://github.com/ruflin/Elastica/blob/master/src/Client.php#L619
For example:
contributte.elastica:
debug: %debugMode%
config:
connections:
-
host: host1
port: 1234
# ...
-
host: host2
port: 5678
# ...
Oh, I see it now. Thanks. I've added some comments.
Ping @tg666
Hi, is there anything I can help with to get this merged? Correct me if I'm wrong (please do!) but I think the package is now unusable e.g. with docker-compose where ES is usually accessible via a different hostname than the default localhost
🤔
It's OK, thanks for pinging me. @jiripudil
Hi, when integrating the extension into our project, I found out that the Client configuration has an invalid structure and also that default (null) values are getting into the Client.
Current configuration example:
But options for the default Client should be in the configuration root. In the case of multiple nodes, they are defined under the key
connections
.New configuration example:
I also marked options
host
,port
,username
,password
andauth_type
as dynamic - parameters, env variables etc. are allowed.Package
nette/schema
is required because of usage of the method::skipDefaults()
that has been added in the version^1.2
.