MCPcopy Create free account
hub / github.com/koding/kite / Delete

Method Delete

kontrol/etcd.go:78–89  ·  view source on GitHub ↗
(k *protocol.Kite)

Source from the content-addressed store, hash-verified

76}
77
78func (e *Etcd) Delete(k *protocol.Kite) error {
79 etcdKey := KitesPrefix + k.String()
80 etcdIDKey := KitesPrefix + "/" + k.ID
81
82 _, e1 := e.client.Delete(context.TODO(), etcdKey, &etcd.DeleteOptions{
83 Recursive: true,
84 })
85 _, e2 := e.client.Delete(context.TODO(), etcdIDKey, &etcd.DeleteOptions{
86 Recursive: true,
87 })
88 return nonil(e1, e2)
89}
90
91func (e *Etcd) Clear() error {
92 _, err := e.client.Delete(context.TODO(), KitesPrefix, &etcd.DeleteOptions{

Callers

nothing calls this directly

Calls 3

nonilFunction · 0.85
DeleteMethod · 0.65
StringMethod · 0.45

Tested by

no test coverage detected