code: func (kv *consulKV) renewSession(
  	pair *api.KVPair,
  	ttl uint64,
  	noCreate bool,
  ) (string, error) {
  	// Check if there is any previous session with an active TTL
  	session, err := kv.getActiveSession(pair.Key)
  	if err != nil {
  		logrus.Infof("Failed to find session: %v", err)
  		return "", err
  	}
  
  	if session != "" {
  		if noCreate {
  			// Do not create new session for the key
  			return "", kvdb.ErrModified
  		}
  		// Destroy the existing session associated with the key
  		kv.client.Destroy(session, nil)
  	}
  
  	durationTTL := time.Duration(int64(ttl)) * time.Second
  
  	entry := &api.SessionEntry{
  		Behavior:  api.SessionBehaviorDelete, // Delete the key when the session expires
  		TTL:       durationTTL.String(),
  		LockDelay: 0, // Virtually disable lock delay
  	}
  
  	// Create the key session
  	session, _, err = kv.client.Create(entry, nil)
  
  	// Session timer is started after a call to "Renew"
  	kv.client.Renew(session, nil)
  
  	return session, err
  }
docs: // Future Use : Support for ttl values in create/update/put