You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In this case, opt.serializer = "raw" | "json" then it had errored.
Thus I added the test case to use require("resty.etcd.v3") .new.
So that both of require("XXX").new become to be able to select the serializer type by string which follows the docs, It should be better to select the type of serializer in lib/resty/etcd/v3.lua.
So that both of require("XXX").new become to be able to select the serializer type by string which follows the docs, It should be better to select the type of serializer in lib/resty/etcd/v3.lua.
I've thought about it for a while and I don't think this is a good change.
Reason:
the require_serializer function in etcd.lua not in v3.lua, this is because the lib originally supported etcd's v2 protocol, so require_serializer was shared by v2.lua and v2.lua. Although this lib is now dropping support for etcd's v2, perhaps etcd's v4 may be available in the future.
require("resty.etcd.v3").new. is the wrong usage and does not need to be compatible.
@findmark
Which the etcd is referred on your configuration require("resty.etcd") or require("resty.etcd.v3") ?
We could not see which it referres on your comments. #126 (comment)
if there is require("resty.etcd"), it might have another bug what we could find yet.
Else, if there is require("resty.etcd.v3"), your configure seems to be incorrect.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Signed-off-by: u5surf [email protected]