OnTokenExpire adds a callback which is called when client receives token-is-expired error from a remote kite.
(handler func())
| 625 | // OnTokenExpire adds a callback which is called when client receives |
| 626 | // token-is-expired error from a remote kite. |
| 627 | func (c *Client) OnTokenExpire(handler func()) { |
| 628 | c.m.Lock() |
| 629 | c.onTokenExpireHandlers = append(c.onTokenExpireHandlers, handler) |
| 630 | c.m.Unlock() |
| 631 | } |
| 632 | |
| 633 | // OnTokenRenew adds a callback which is called when client successfully |
| 634 | // renews its token. |
no outgoing calls