User cache & push notifications management. These are calls received by the Master from Proxy. The Proxy expects no payload to be returned by the master. UserCacheUpdate endpoint receives updates to user's cached values as well as sends push notifications.
(msg *UserCacheReq, rejected *bool)
| 667 | |
| 668 | // UserCacheUpdate endpoint receives updates to user's cached values as well as sends push notifications. |
| 669 | func (c *Cluster) UserCacheUpdate(msg *UserCacheReq, rejected *bool) error { |
| 670 | if msg.Gone { |
| 671 | // User is deleted. Evict all user's sessions. |
| 672 | globals.sessionStore.EvictUser(msg.UserId, "") |
| 673 | |
| 674 | if globals.cluster.isRemoteTopic(msg.UserId.UserId()) { |
| 675 | // No need to delete user's cache if user is remote. |
| 676 | return nil |
| 677 | } |
| 678 | } |
| 679 | |
| 680 | usersRequestFromCluster(msg) |
| 681 | return nil |
| 682 | } |
| 683 | |
| 684 | // Ping is a gRPC endpoint which receives ping requests from peer nodes.Used to detect node restarts. |
| 685 | func (c *Cluster) Ping(ping *ClusterPing, unused *bool) error { |
nothing calls this directly
no test coverage detected