Apply suggestions from code review
Review suggestions in the documentation Co-authored-by: Leo Antunes <leo@costela.net>
This commit is contained in:
parent
faf1c35d96
commit
9ddcbb7914
|
@ -11,12 +11,12 @@ type delegateNode struct {
|
|||
*common.Node
|
||||
}
|
||||
|
||||
// NotifyConflict implements the memberlist deletage interface
|
||||
// NotifyConflict implements the memberlist.Delegate interface
|
||||
func (n *delegateNode) NotifyConflict(node, other *memberlist.Node) {
|
||||
logrus.Errorf("node name conflict detected: %s", other.Name)
|
||||
}
|
||||
|
||||
// NodeMeta implements the memberlist deletage interface
|
||||
// NodeMeta implements the memberlist.Delegate interface
|
||||
// Metadata is provided by the local node settings, encoding is handled
|
||||
// by the node implementation directly
|
||||
func (n *delegateNode) NodeMeta(limit int) []byte {
|
||||
|
@ -28,14 +28,14 @@ func (n *delegateNode) NodeMeta(limit int) []byte {
|
|||
return encoded
|
||||
}
|
||||
|
||||
// NotifyMsg implements the memberlist deletage interface
|
||||
// NotifyMsg implements the memberlist.Delegate interface
|
||||
func (n *delegateNode) NotifyMsg([]byte) {}
|
||||
|
||||
// GetBroadcasts implements the memberlist deletage interface
|
||||
// GetBroadcasts implements the memberlist.Delegate interface
|
||||
func (n *delegateNode) GetBroadcasts(overhead, limit int) [][]byte { return nil }
|
||||
|
||||
// LocalState implements the memberlist deletage interface
|
||||
// LocalState implements the memberlist.Delegate interface
|
||||
func (n *delegateNode) LocalState(join bool) []byte { return nil }
|
||||
|
||||
// MergeRemoteState implements the memberlist deletage interface
|
||||
// MergeRemoteState implements the memberlist.Delegate interface
|
||||
func (n *delegateNode) MergeRemoteState(buf []byte, join bool) {}
|
||||
|
|
|
@ -87,7 +87,7 @@ func (s *State) DownInterface() error {
|
|||
return netlink.LinkDel(link)
|
||||
}
|
||||
|
||||
// SetUpInterface creates and setup the associated network interface
|
||||
// SetUpInterface creates and sets up the associated network interface
|
||||
func (s *State) SetUpInterface(nodes []common.Node) error {
|
||||
if err := netlink.LinkAdd(&wireguard{LinkAttrs: netlink.LinkAttrs{Name: s.iface}}); err != nil && !os.IsExist(err) {
|
||||
return errors.Wrapf(err, "could not create interface %s", s.iface)
|
||||
|
|
Loading…
Reference in New Issue