DeleteMachine deletes associated etcd folder of a machine entirely
()
| 173 | |
| 174 | // DeleteMachine deletes associated etcd folder of a machine entirely |
| 175 | func (m *etcdMachineInterface) DeleteMachine() error { |
| 176 | ctx, cancel := context.WithTimeout(context.Background(), 3*time.Second) |
| 177 | defer cancel() |
| 178 | _, err := m.etcdDS.keysAPI.Delete(ctx, |
| 179 | path.Join(m.etcdDS.ClusterName(), etcdMachinesDirName, m.Hostname()), |
| 180 | &etcd.DeleteOptions{Dir: true, Recursive: true}) |
| 181 | return err |
| 182 | } |
| 183 | |
| 184 | // ListFlags returns the list of all the flgas of a machine from Etcd |
| 185 | // etcd and machine prefix will be added to the path |
nothing calls this directly
no test coverage detected