Files
brianmcgee e3a7790e57
buildbot/nix-eval Build done.
PR Size Review Check / pr-size-review-gate (pull_request) Successful in 24s
sizelint / sizelint (pull_request) Successful in 2m12s
buildbot/nix-build Build done.
gitea-mq Already up to date with target branch
fix breaks in gofumpt and golangci-lint from updating nixpkgs
2026-07-07 16:32:14 +01:00

37 lines
821 B
Go

package cluster
import (
"log/slog"
"github.com/libp2p/go-libp2p/core/network"
"github.com/multiformats/go-multiaddr"
)
// notify implements network.Notifiee for connection events.
type notify struct {
cluster *Cluster
}
func (n *notify) Connected(_ network.Network, conn network.Conn) {
remotePeer := conn.RemotePeer()
slog.Info(
"peer connected",
"peer_id", remotePeer.String(),
"remote_addr", conn.RemoteMultiaddr().String(),
)
}
func (n *notify) Disconnected(_ network.Network, conn network.Conn) {
remotePeer := conn.RemotePeer()
slog.Info(
"peer disconnected",
"peer_id", remotePeer.String(),
"remote_addr", conn.RemoteMultiaddr().String(),
)
}
func (n *notify) Listen(network.Network, multiaddr.Multiaddr) {}
func (n *notify) ListenClose(network.Network, multiaddr.Multiaddr) {}