MCPcopy Index your code
hub / github.com/koding/kite / etcdKey

Method etcdKey

kontrol/etcd.go:275–291  ·  view source on GitHub ↗
(query *protocol.KontrolQuery)

Source from the content-addressed store, hash-verified

273}
274
275func (e *Etcd) etcdKey(query *protocol.KontrolQuery) (string, error) {
276 if onlyIDQuery(query) {
277 resp, err := e.client.Get(context.TODO(),
278 KitesPrefix+"/"+query.ID,
279 &etcd.GetOptions{
280 Recursive: true,
281 },
282 )
283 if err != nil {
284 return "", err
285 }
286
287 return resp.Node.Value, nil
288 }
289
290 return GetQueryKey(query)
291}
292
293// RegisterValue is the type of the value that is saved to etcd.
294type RegisterValue struct {

Callers 1

GetMethod · 0.95

Calls 3

onlyIDQueryFunction · 0.85
GetQueryKeyFunction · 0.85
GetMethod · 0.65

Tested by

no test coverage detected