diff --git a/zk/structs.go b/zk/structs.go index 9400c3c0..12e5742a 100644 --- a/zk/structs.go +++ b/zk/structs.go @@ -149,6 +149,7 @@ type connectRequest struct { TimeOut int32 SessionID int64 Passwd []byte + ReadOnly bool // always false as we don't support ro mode } type connectResponse struct { @@ -156,6 +157,7 @@ type connectResponse struct { TimeOut int32 SessionID int64 Passwd []byte + ReadOnly bool } type CreateRequest struct { diff --git a/zk/structs_test.go b/zk/structs_test.go index 3a38ab45..4bff6cb1 100644 --- a/zk/structs_test.go +++ b/zk/structs_test.go @@ -8,8 +8,8 @@ import ( func TestEncodeDecodePacket(t *testing.T) { t.Parallel() encodeDecodeTest(t, &requestHeader{-2, 5}) - encodeDecodeTest(t, &connectResponse{1, 2, 3, nil}) - encodeDecodeTest(t, &connectResponse{1, 2, 3, []byte{4, 5, 6}}) + encodeDecodeTest(t, &connectResponse{1, 2, 3, nil, false}) + encodeDecodeTest(t, &connectResponse{1, 2, 3, []byte{4, 5, 6}, false}) encodeDecodeTest(t, &getAclResponse{[]ACL{{12, "s", "anyone"}}, Stat{}}) encodeDecodeTest(t, &getChildrenResponse{[]string{"foo", "bar"}}) encodeDecodeTest(t, &pathWatchRequest{"path", true})