Skip to content

Commit

Permalink
Remove unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
yvanoers committed Jun 14, 2021
1 parent a767b58 commit 19f19cd
Showing 1 changed file with 0 additions and 27 deletions.
27 changes: 0 additions & 27 deletions dkron/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -594,33 +594,6 @@ func (a *Agent) IsLeader() bool {
return a.raft.State() == raft.Leader
}

// Members is used to return the members of the serf cluster
func (a *Agent) Members() []serf.Member {
return a.serf.Members()
}

// LocalMember is used to return the local node
func (a *Agent) LocalMember() serf.Member {
return a.serf.LocalMember()
}

// Leader is used to return the Raft leader
func (a *Agent) Leader() raft.ServerAddress {
return a.raft.Leader()
}

// Servers returns a list of known server
func (a *Agent) Servers() (members []*ServerParts) {
for _, member := range a.serf.Members() {
ok, parts := isServer(member)
if !ok || member.Status != serf.StatusAlive {
continue
}
members = append(members, parts)
}
return members
}

// LocalServers returns a list of the local known server
func (a *Agent) LocalServers() (members []*ServerParts) {
for _, member := range a.serf.Members() {
Expand Down

0 comments on commit 19f19cd

Please sign in to comment.