code: func (r *RegisterMonitor) deregister() {
  	// Basic retry loop, no backoff for now. But we want to retry a few
  	// times just in case there are basic ephemeral issues.
  	for i := 0; i < 3; i++ {
  		err := r.Client.Agent().ServiceDeregister(r.serviceID())
  		if err == nil {
  			return
  		}
  
  		r.Logger.Printf("[WARN] proxy: service deregister failed: %s", err)
  		time.Sleep(500 * time.Millisecond)
  	}
  }
docs: // deregister deregisters the service.