MCPcopy
hub / github.com/rqlite/rqlite / Bootstrap

Method Bootstrap

store/store.go:858–870  ·  view source on GitHub ↗

Bootstrap executes a cluster bootstrap on this node, using the given Servers as the configuration.

(servers ...*Server)

Source from the content-addressed store, hash-verified

856// Bootstrap executes a cluster bootstrap on this node, using the given
857// Servers as the configuration.
858func (s *Store) Bootstrap(servers ...*Server) error {
859 raftServers := make([]raft.Server, len(servers))
860 for i := range servers {
861 raftServers[i] = raft.Server{
862 ID: raft.ServerID(servers[i].ID),
863 Address: raft.ServerAddress(servers[i].Addr),
864 }
865 }
866 fut := s.raft.BootstrapCluster(raft.Configuration{
867 Servers: raftServers,
868 })
869 return fut.Error()
870}
871
872// getServerAddressByID returns the server address for the given server ID.
873// It returns an error if the server ID is not found in the cluster configuration.

Implementers 1

Storestore/store.go

Calls 1

ErrorMethod · 0.65