code: func (a *Agent) sendCoordinate() {
  OUTER:
  	for {
  		rate := a.config.SyncCoordinateRateTarget
  		min := a.config.SyncCoordinateIntervalMin
  		intv := lib.RateScaledInterval(rate, min, len(a.LANMembers()))
  		intv = intv + lib.RandomStagger(intv)
  
  		select {
  		case <-time.After(intv):
  			members := a.LANMembers()
  			grok, err := consul.CanServersUnderstandProtocol(members, 3)
  			if err != nil {
  				a.logger.Printf("[ERR] agent: Failed to check servers: %s", err)
  				continue
  			}
  			if !grok {
  				a.logger.Printf("[DEBUG] agent: Skipping coordinate updates until servers are upgraded")
  				continue
  			}
  
  			cs, err := a.GetLANCoordinate()
  			if err != nil {
  				a.logger.Printf("[ERR] agent: Failed to get coordinate: %s", err)
  				continue
  			}
  
  			for segment, coord := range cs {
  				req := structs.CoordinateUpdateRequest{
  					Datacenter:   a.config.Datacenter,
  					Node:         a.config.NodeName,
  					Segment:      segment,
  					Coord:        coord,
  					WriteRequest: structs.WriteRequest{Token: a.tokens.AgentToken()},
  				}
  				var reply struct{}
  				if err := a.RPC("Coordinate.Update", &req, &reply); err != nil {
  					if acl.IsErrPermissionDenied(err) {
  						a.logger.Printf("[WARN] agent: Coordinate update blocked by ACLs")
  					} else {
  						a.logger.Printf("[ERR] agent: Coordinate update error: %v", err)
  					}
  					continue OUTER
  				}
  			}
  		case <-a.shutdownCh:
  			return
  		}
  	}
  }
docs: // sendCoordinate is a long-running loop that periodically sends our coordinate
  // to the server. Closing the agent's shutdownChannel will cause this to exit.