Skip to content
This repository was archived by the owner on Jul 21, 2021. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions zk/structs.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,13 +149,15 @@ type connectRequest struct {
TimeOut int32
SessionID int64
Passwd []byte
ReadOnly bool // always false as we don't support ro mode
}

type connectResponse struct {
ProtocolVersion int32
TimeOut int32
SessionID int64
Passwd []byte
ReadOnly bool
}

type CreateRequest struct {
Expand Down
4 changes: 2 additions & 2 deletions zk/structs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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})
Expand Down