code: func (s *nodeStore) CheckRateLimit(id string) error {
  	s.mu.Lock()
  	defer s.mu.Unlock()
  	if existRn, ok := s.nodes[id]; ok {
  		if time.Since(existRn.Registered) > s.rateLimitPeriod {
  			existRn.Attempts = 0
  		}
  		existRn.Attempts++
  		if existRn.Attempts > rateLimitCount {
  			return status.Errorf(codes.Unavailable, "node %s exceeded rate limit count of registrations", id)
  		}
  		existRn.Registered = time.Now()
  	}
  	return nil
  }
docs: // CheckRateLimit returns error if node with specified id is allowed to re-register
  // again.