mirror of
https://github.com/netbirdio/netbird.git
synced 2026-10-09 15:09:08 +02:00
[management] Tear down only the peer session that owns the stream (#8057)
This commit is contained in:
@@ -35,7 +35,10 @@ type Controller interface {
|
||||
OnPeersDeleted(ctx context.Context, accountID string, peerIDs []string, affectedPeerIDs []string) error
|
||||
DisconnectPeers(ctx context.Context, accountId string, peerIDs []string)
|
||||
OnPeerConnected(ctx context.Context, accountID string, peerID string) (chan *UpdateMessage, error)
|
||||
OnPeerDisconnected(ctx context.Context, accountID string, peerID string)
|
||||
// OnPeerDisconnected tears down the stream state of the peer's session, identified by its
|
||||
// updates channel. It returns false and leaves everything untouched when a newer session
|
||||
// owns the peer. A nil session is the newest session and tears down any registered channel.
|
||||
OnPeerDisconnected(ctx context.Context, accountID string, peerID string, session chan *UpdateMessage) bool
|
||||
|
||||
TrackEphemeralPeer(ctx context.Context, peer *nbpeer.Peer)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user