Skip to content
This repository has been archived by the owner on Aug 26, 2024. It is now read-only.

Commit

Permalink
Add Session.AllHosts
Browse files Browse the repository at this point in the history
We need to be able to iterate HostInfos from a client.
  • Loading branch information
martin-sucha committed Jan 29, 2024
1 parent d7209ab commit 1f6fc91
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions session.go
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,11 @@ func (s *Session) reconnectDownedHosts(intv time.Duration) {
}
}

// AllHosts returns all hosts currently in the token ring.
func (s *Session) AllHosts() []*HostInfo {
return s.ring.allHosts()
}

// SetConsistency sets the default consistency level for this session. This
// setting can also be changed on a per-query basis and the default value
// is Quorum.
Expand Down

0 comments on commit 1f6fc91

Please sign in to comment.