func (s *server) Replica(shard int) error { role, ok := s.roles[shard] require.False(s.t, ok, "Replica %d assigned when we're already %s for it.", shard, role) s.roles[shard] = "replica" return nil }
func (s *server) Master(shard int) error { role, ok := s.roles[shard] require.False(s.t, ok, "Master %d assigned when we're already %s for it.", shard, role) s.roles[shard] = "master" return nil }