-
Notifications
You must be signed in to change notification settings - Fork 1
/
conn.go
27 lines (22 loc) · 866 Bytes
/
conn.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package water
import (
"net"
)
// Conn is an abstracted connection interface which is expected
// to encapsulate a Core.
type Conn interface {
net.Conn
// For forward compatibility with any new methods added to the
// interface, all Conn implementations MUST embed the
// UnimplementedConn in order to make sure they could be used
// in the future without any code change.
mustEmbedUnimplementedConn()
}
// UnimplementedConn is used to provide forward compatibility for
// implementations of Conn, such that if new methods are added
// to the interface, old implementations will not be required to implement
// each of them.
type UnimplementedConn struct{}
// mustEmbedUnimplementedConn is a no-op method used to test an implementation
// of Conn really embeds UnimplementedConn.
func (*UnimplementedConn) mustEmbedUnimplementedConn() {} //nolint:unused