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

Method Kite

kontrol/node.go:49–65  ·  view source on GitHub ↗

Kite returns a single kite gathered from the key and the value for the current node.

()

Source from the content-addressed store, hash-verified

47// Kite returns a single kite gathered from the key and the value for the
48// current node.
49func (n *Node) Kite() (*protocol.KiteWithToken, error) {
50 kite, err := n.KiteFromKey()
51 if err != nil {
52 return nil, err
53 }
54
55 val, err := n.Value()
56 if err != nil {
57 return nil, err
58 }
59
60 return &protocol.KiteWithToken{
61 Kite: *kite,
62 URL: val.URL,
63 KeyID: val.KeyID,
64 }, nil
65}
66
67// KiteFromKey returns a *protocol.Kite from an etcd key. etcd key is like:
68// "/kites/devrim/env/mathworker/1/localhost/tardis.local/id"

Callers 15

KitesMethod · 0.95
GetMethod · 0.95
TestKontrol_HandleWebRTCFunction · 0.45
HandleGetKitesMethod · 0.45
HandleGetTokenMethod · 0.45
CallFunction · 0.45
WaitTillConnectedFunction · 0.45
TestRegisterDenyEvilFunction · 0.45
TestMultipleRegisterFunction · 0.45
TestTokenInvalidationFunction · 0.45
TestGetTokenFunction · 0.45
TestKontrolFunction · 0.45

Calls 2

KiteFromKeyMethod · 0.95
ValueMethod · 0.95

Tested by 9

TestKontrol_HandleWebRTCFunction · 0.36
CallFunction · 0.36
WaitTillConnectedFunction · 0.36
TestRegisterDenyEvilFunction · 0.36
TestMultipleRegisterFunction · 0.36
TestTokenInvalidationFunction · 0.36
TestGetTokenFunction · 0.36
TestKontrolFunction · 0.36
TestKontrolMultiKeyFunction · 0.36