code: func (e *Etcd) Allocate(offset int) (bool, error) {
  	e.lock.Lock()
  	defer e.lock.Unlock()
  
  	ok, err := e.alloc.Allocate(offset)
  	if !ok || err != nil {
  		return ok, err
  	}
  
  	err = e.tryUpdate(func() error {
  		ok, err := e.alloc.Allocate(offset)
  		if err != nil {
  			return err
  		}
  		if !ok {
  			return errorUnableToAllocate
  		}
  		return nil
  	})
  	if err != nil {
  		if err == errorUnableToAllocate {
  			return false, nil
  		}
  		return false, err
  	}
  	return true, nil
  }
docs: // Allocate attempts to allocate the item locally and then in etcd.