Closed enumag closed 5 years ago
Yep, on my todo-list, should be EndpointExtensions
. Wanna change yourself and provide a PR?
Maybe we should use ConnectionSettings
in ProjectionsManagerFactory
? But I'm not sure - it seems that ProjectionsManagerFactory
doesn't need the $requireMaster
boolean.
Maybe we should use
ConnectionSettings
inProjectionsManagerFactory
? But I'm not sure - it seems thatProjectionsManagerFactory
doesn't need the$requireMaster
boolean.
Not sure about that.
Endpoint, Schema and UserCredentials are all needed in the EventStoreHttpConnection, UsersManager, ProjectionsManage and PersistentSubscriptionsManager so it would make sense to wrap these into one value object.
$requireMaster
adds an 'ES-RequiresMaster'
header to the HTTP requests created by EventStoreHttpConnection
. Would this header make sense for the requests created by UsersManager, ProjectionsManage and PersistentSubscriptionsManager?
Nope, this header makes no sense there, but that's not the main issue I have. We could have an option that is unused in the managers, I think that's not a big deal. However for the QueryManager, you may need to configure your http client manually yourself to set much higher timeouts as the defaults.
Nope, this header makes no sense there, but that's not the main issue I have. We could have an option that is unused in the managers, I think that's not a big deal.
Then we can change ConnectionSettings
to use EndpointExtensions
and use it in all the managers, right?
However for the QueryManager, you may need to configure your http client manually yourself to set much higher timeouts as the defaults.
I'm not suggesting to add the HttpClient to ConnectionSettings. And there is nothing forcing you to configure everything the same way either so I don't see a problem here.
Hmm there are some more inconsistencies... Some classes (like ProjectionsClient
) are using EndpointExtensions::formatStringToHttpUrl()
while other classes such as AppendToStreamOperation
are using simple string concatenation. I'm guessing this should be unified as well.
Hmm there are some more inconsistencies... Some classes (like
ProjectionsClient
) are usingEndpointExtensions::formatStringToHttpUrl()
while other classes such asAppendToStreamOperation
are using simple string concatenation. I'm guessing this should be unified as well.
Yes, most of the code was written quick and dirty - I expect lots of inconsistencies currently. I need to review everything once tests are there.
ConnectionSettings
used byEventStoreHttpConnection
has$useSslConnection
parameter which is resolved to http or https here.ProjectionsManagerFactory
on the other hand is usingEndpointExtensions
constants.I expect you'll want to unify this somehow.