You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2020/09/14 11:52:42 UTC

[GitHub] [apisix] tokers commented on a change in pull request #2036: feature: support etcd v3, by mocking v2 API

tokers commented on a change in pull request #2036:
URL: https://github.com/apache/apisix/pull/2036#discussion_r487852649



##########
File path: apisix/core/etcd.lua
##########
@@ -44,24 +49,144 @@ end
 _M.new = new
 
 
+local function kvs_to_node(kvs)
+    local node = {}
+    node.key = kvs.key
+    node.value = kvs.value
+    node.createdIndex = tonumber(kvs.create_revision)

Review comment:
       @membphis You can get the prototype of ETCD response here:
   
   * https://github.com/etcd-io/etcd/blob/master/etcdserver/etcdserverpb/rpc.proto#L502
   * https://github.com/etcd-io/etcd/blob/master/mvcc/mvccpb/kv.proto#L12




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org