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

Method Register

kontrol/helper_test.go:28–44  ·  view source on GitHub ↗
(hk *HelloKite)

Source from the content-addressed store, hash-verified

26}
27
28func (c *Config) Register(hk *HelloKite) error {
29 if c.RegisterFunc != nil {
30 return c.RegisterFunc(hk)
31 }
32
33 if err := hk.Kite.RegisterForever(hk.URL); err != nil {
34 hk.Kite.Close()
35 return err
36 }
37
38 if _, err := hk.WaitRegister(15 * time.Second); err != nil {
39 hk.Kite.Close()
40 return err
41 }
42
43 return nil
44}
45
46func startKontrol(pem, pub string, port int) (*Kontrol, *Config) {
47 conf := config.New()

Callers 6

NewHelloKiteFunction · 0.45
TestRegisterDenyEvilFunction · 0.45
TestTokenInvalidationFunction · 0.45
TestGetKitesFunction · 0.45
TestGetTokenFunction · 0.45
TestRegisterKiteFunction · 0.45

Calls 3

RegisterForeverMethod · 0.80
WaitRegisterMethod · 0.80
CloseMethod · 0.45

Tested by

no test coverage detected