/usr/share/gocode/src/github.com/weaveworks/mesh/meshconn/mesh_addr.go is in golang-github-weaveworks-mesh-dev 0+git20161024.3dd75b1-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | package meshconn
import (
"fmt"
"net"
"github.com/weaveworks/mesh"
)
// MeshAddr implements net.Addr for mesh peers.
type MeshAddr struct {
mesh.PeerName // stable across invocations
mesh.PeerUID // new with each invocation
}
var _ net.Addr = MeshAddr{}
// Network returns weavemesh.
func (a MeshAddr) Network() string { return "weavemesh" }
// String returns weavemesh://<PeerName>.
func (a MeshAddr) String() string { return fmt.Sprintf("%s://%s", a.Network(), a.PeerName.String()) }
|