MCPcopy Create free account
hub / github.com/cafebazaar/blacksmith / DeleteMachine

Method DeleteMachine

datasource/etcd_machine.go:175–182  ·  view source on GitHub ↗

DeleteMachine deletes associated etcd folder of a machine entirely

()

Source from the content-addressed store, hash-verified

173
174// DeleteMachine deletes associated etcd folder of a machine entirely
175func (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

Callers

nothing calls this directly

Calls 2

HostnameMethod · 0.95
ClusterNameMethod · 0.65

Tested by

no test coverage detected