Skip to content

Commit

Permalink
etcdserver: document v2 usage in "publish" method
Browse files Browse the repository at this point in the history
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
  • Loading branch information
gyuho committed Jul 29, 2019
1 parent 1f2924b commit ea7b40e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions etcdserver/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -1980,6 +1980,12 @@ func (s *EtcdServer) sync(timeout time.Duration) {
// static clientURLs of the server.
// The function keeps attempting to register until it succeeds,
// or its server is stopped.
//
// Use v2 store to encode member attributes, and apply through Raft
// but does not go through v2 API endpoint, which means even with v2
// client handler disabled (e.g. --enable-v2=false), cluster can still
// process publish requests through rafthttp
// TODO: Deprecate v2 store
func (s *EtcdServer) publish(timeout time.Duration) {
b, err := json.Marshal(s.attributes)
if err != nil {
Expand Down

0 comments on commit ea7b40e

Please sign in to comment.