Skip to content

Commit 81dc762

Browse files
linsitenemith
authored andcommitted
[doc] add go doc for Dialer, Conn, Event
1 parent ebcbcaa commit 81dc762

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

conn.go

+4
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ type watchPathType struct {
5454
wType watchType
5555
}
5656

57+
// Dialer is a function to be used to establish a connection to a single host.
5758
type Dialer func(network, address string, timeout time.Duration) (net.Conn, error)
5859

5960
// Logger is an interface that can be implemented to provide custom log output.
@@ -66,6 +67,7 @@ type authCreds struct {
6667
auth []byte
6768
}
6869

70+
// Conn is the client connection and tracks all details for communication with the server.
6971
type Conn struct {
7072
lastZxid int64
7173
sessionID int64
@@ -138,6 +140,8 @@ type response struct {
138140
err error
139141
}
140142

143+
// Event is an Znode event sent by the server.
144+
// Refer to EventType for more details.
141145
type Event struct {
142146
Type EventType
143147
State State

0 commit comments

Comments
 (0)