(query *protocol.KontrolQuery)
| 273 | } |
| 274 | |
| 275 | func (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. |
| 294 | type RegisterValue struct { |
no test coverage detected