(timeout time.Duration)
| 139 | } |
| 140 | |
| 141 | func (hk *HelloKite) WaitRegister(timeout time.Duration) (*protocol.RegisterResult, error) { |
| 142 | select { |
| 143 | case reg := <-hk.regs: |
| 144 | return reg, nil |
| 145 | case <-time.After(timeout): |
| 146 | return nil, fmt.Errorf("waiting for register timed out after %s", timeout) |
| 147 | } |
| 148 | } |
| 149 | |
| 150 | func (hk *HelloKite) onTokenExpire() { |
| 151 | hk.toks <- struct{}{} |
no outgoing calls
no test coverage detected