// RemoveRemote removes the remote with the given blobKey.
173254
func RemoveRemote(tx *sql.Tx, blobKey string) error {
	_, err := tx.Exec("DELETE FROM remote WHERE blobkey == $1", blobKey)
	if err != nil {
		return err
	}
	return nil
}
519409
func (c *Client) RemoveBlob(ctx context.Context, b blob.Ref) error {
	return c.RemoveBlobs(ctx, []blob.Ref{b})
}
548255
func (_m *APIClient) ImageRemove(ctx context.Context, _a1 string, options types.ImageRemoveOptions) ([]types.ImageDeleteResponseItem, error) {
	ret := _m.Called(ctx, _a1, options)

	var r0 []types.ImageDeleteResponseItem
	if rf, ok := ret.Get(0).(func(context.Context, string, types.ImageRemoveOptions) []types.ImageDeleteResponseItem); ok {
		r0 = rf(ctx, _a1, options)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]types.ImageDeleteResponseItem)
		}
	}

	var r1 error
	if rf, ok := ret.Get(1).(func(context.Context, string, types.ImageRemoveOptions) error); ok {
		r1 = rf(ctx, _a1, options)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}
844918
func (r *remoteKeySet) keysFromRemote(ctx context.Context) ([]jose.JSONWebKey, error) {
	// Need to lock to inspect the inflight request field.
	r.mu.Lock()
	// If there's not a current inflight request, create one.
	if r.inflight == nil {
		r.inflight = newInflight()

		// This goroutine has exclusive ownership over the current inflight
		// request. It releases the resource by nil'ing the inflight field
		// once the goroutine is done.
		go func() {
			// Sync keys and finish inflight when that's done.
			keys, expiry, err := r.updateKeys()

			r.inflight.done(keys, err)

			// Lock to update the keys and indicate that there is no longer an
			// inflight request.
			r.mu.Lock()
			defer r.mu.Unlock()

			if err == nil {
				r.cachedKeys = keys
				r.expiry = expiry
			}

			// Free inflight so a different request can run.
			r.inflight = nil
		}()
	}
	inflight := r.inflight
	r.mu.Unlock()

	select {
	case <-ctx.Done():
		return nil, ctx.Err()
	case <-inflight.wait():
		return inflight.result()
	}
}
1317082
func (k *KeyManager) RemoveKey(key string) (*KeyResponse, error) {
	return k.RemoveKeyWithOptions(key, nil)
}
1366866
func (s *SQLKeyDBStore) RemoveKey(keyID string) error {
	// Delete the key from the database
	s.db.Where(&GormPrivateKey{KeyID: keyID}).Delete(&GormPrivateKey{})

	return nil
}
1197163
func IsValidRemote(remote string) bool {
	return urlutil.IsGitURL(remote) || urlutil.IsURL(remote)
}
1225869
func (p *SigningProfile) updateRemote(remote string) error {
	if remote != "" {
		p.RemoteServer = remote
	}
	return nil
}
1270793
func (g *Noop) AddRemote(ctx context.Context, remote, url string) error {
	return nil
}
586629
func (s *CombinedMapSlice) UpsertRemote(key MergeKeys, l interface{}) error {
	item, err := s.upsert(key, l)
	if err != nil {
		return err
	}
	item.SetRemote(l)
	return nil
}
1220608
func (c *Client) LinkRemove(bucket, key, lbucket, lkey string) error {
	obj, err := c.FetchObject(bucket, key)
	if err != nil {
		return err
	}

	if len(obj.GetContent()) == 0 {
		return ErrNoContent
	}

	for i, k := range obj.GetContent()[0].GetLinks() {
		if string(k.GetBucket()) == lbucket && string(k.GetKey()) == lkey {
			obj.Content[0].Links[i] = obj.Content[0].Links[len(obj.Content[0].Links)-1]
			obj.Content[0].Links = obj.Content[0].Links[0 : len(obj.Content[0].Links)-1]
			break
		}
	}

	if _, err := c.StoreObject(bucket, key, obj.GetContent()[0]); err != nil {
		return err
	}

	return nil
}
1324340
func RegisterRemote(c component.Component, options ...component.Option) {
	remoteComp = append(remoteComp, regComp{c, options})
}
1237635
func (repo *Repository) AddRemote(name, url string, fetch bool) error {
	cmd := NewCommand("remote", "add")
	if fetch {
		cmd.AddArguments("-f")
	}
	cmd.AddArguments(name, url)

	_, err := cmd.RunInDir(repo.Path)
	return err
}
214662
func (n *Node) BindRemote(ctx context.Context, listenAddr string, advertiseAddr string) error {
	n.RLock()
	defer n.RUnlock()

	if n.manager == nil {
		return errors.New("manager is not running")
	}

	return n.manager.BindRemote(ctx, manager.RemoteAddrs{
		ListenAddr:    listenAddr,
		AdvertiseAddr: advertiseAddr,
	})
}
714679
func (s *FaultRootCauseEntity) SetRemote(v bool) *FaultRootCauseEntity {
	s.Remote = &v
	return s
}
56035
func (s *State) IsRemote() bool {
	if s == nil {
		return false
	}
	s.Lock()
	defer s.Unlock()

	if s.Remote == nil {
		return false
	}
	if s.Remote.Type == "" {
		return false
	}

	return true
}
393773
func (swap *Swap) SetRemote(remote *Profile) {
	defer swap.lock.Unlock()
	swap.lock.Lock()

	swap.remote = remote
	if swap.Sells && (remote.BuyAt.Sign() <= 0 || swap.local.SellAt.Sign() <= 0 || remote.BuyAt.Cmp(swap.local.SellAt) < 0) {
		swap.Out.Stop()
		swap.Sells = false
	}
	if swap.Buys && (remote.SellAt.Sign() <= 0 || swap.local.BuyAt.Sign() <= 0 || swap.local.BuyAt.Cmp(swap.remote.SellAt) < 0) {
		swap.In.Stop()
		swap.Buys = false
	}

	log.Debug(fmt.Sprintf("<%v> remote profile set: pay at: %v, drop at: %v, buy at: %v, sell at: %v", swap.proto, remote.PayAt, remote.DropAt, remote.BuyAt, remote.SellAt))

}