api7 / lua-resty-etcd

Nonblocking Lua etcd driver library for OpenResty

Home Page:https://api7.ai/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

doc: should use name `dir` for some API

membphis opened this issue · comments

syntax: res, err = cli:push(key:string, val:JSON value [, ttl:int])
to
syntax: res, err = cli:push(dir:string, val:JSON value [, ttl:int])

https://github.com/api7/lua-resty-etcd/blob/master/api_v2.md#push

I think unified naming would be better for understanding, comparing to leaving both key and dir in doc.

And I think key would fit better for this job, but I think I could also accept change all of them to dir. For me, the most negative effect that dir could have is the phrase key-value. It could be weird to change it to dir-value, but if we only leave this phrase here and change all others, it could be hard to find the correspondence.

Sorry I think I misunderstood the meaning of this issue, I'll work on this one.