Skip to content

Commit

Permalink
netlink: deprecate Socket interface
Browse files Browse the repository at this point in the history
Signed-off-by: Matt Layher <mdlayher@gmail.com>
  • Loading branch information
mdlayher committed Apr 26, 2022
1 parent 30d5992 commit d1b69ea
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 4 additions & 0 deletions conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ type Conn struct {

// A Socket is an operating-system specific implementation of netlink
// sockets used by Conn.
//
// Deprecated: the intent of Socket was to provide an abstraction layer for
// testing, but this abstraction is awkward to use properly and disables much of
// the functionality of the Conn type. Do not use.
type Socket interface {
Close() error
Send(m Message) error
Expand Down
2 changes: 0 additions & 2 deletions nltest/nltest.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,6 @@ func CheckRequest(types []netlink.HeaderType, flags []netlink.HeaderFlags, fn Fu
}
}

var _ netlink.Socket = &socket{}

// A socket is a netlink.Socket used for testing.
type socket struct {
fn Func
Expand Down

0 comments on commit d1b69ea

Please sign in to comment.