Consul is a distributed, highly available, and data center aware solution to connect and configure applications across dynamic, distributed infrastructure.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

25 lines
544 B

package consul
import (
"net"
)
// Raft endpoint is used to manipulate the Raft subsystem
type Raft struct {
server *Server
}
func (r *Raft) RemovePeer(args string, reply *struct{}) error {
peer, err := net.ResolveTCPAddr("tcp", args)
if err != nil {
r.server.logger.Printf("[ERR] consul.raft: failed to parse peer: %v", err)
return err
}
future := r.server.raft.RemovePeer(peer)
return future.Error()
}
func (r *Raft) Snapshot(args struct{}, reply *struct{}) error {
future := r.server.raft.Snapshot()
return future.Error()
}