func (p Peer) Node() *memberlist.Node {
	return &memberlist.Node{
		Name: p.Name,
		Addr: p.Addr,
		Port: p.Port,
	}
}
Returns a memberlist node from a peer
datra
package gossip
import (
	"math/rand"
	"net"
	"github.com/hashicorp/memberlist"
	"github.com/pkg/errors"
)
type Status int32
const (
	AgentStatusAlive Status = iota
	AgentStatusLeaving
	AgentStatusLeft
	AgentStatusShutdown
	AgentStatusFailed
)
func (s Status) String() string {
	switch s {
	case AgentStatusAlive:
		return "alive"
	case AgentStatusLeaving:
		return "leaving"
	case AgentStatusLeft:
		return "left"
	case AgentStatusShutdown:
		return "shutdown"
	default:
		return "failed"
	}
}
type Peer struct {
	Name   string
	Addr   net.IP
	Port   uint16
	Meta   Meta
	Status Status
}