boskos/client/client.go
func (c *Client) UpdateAll(state string) error {
	c.lock.Lock()
	defer c.lock.Unlock()

	resources, err := c.storage.List()
	if err != nil {
		return err
	}
	if len(resources) == 0 {
		return fmt.Errorf("no holding resource")
	}
	var allErrors error
	for _, r := range resources {
		if err := c.update(r.GetName(), state, nil); err != nil {
			allErrors = multierror.Append(allErrors, err)
			continue
		}
		if err := c.updateLocalResource(r, state, nil); err != nil {
			allErrors = multierror.Append(allErrors, err)
		}
	}
	return allErrors
}
func (c *Client) UpdateAll(state string) error {
	c.lock.Lock()
	defer c.lock.Unlock()

	resources, err := c.storage.List()
	if err != nil {
		return err
	}
	if len(resources) == 0 {
		return fmt.Errorf("no holding resource")
	}
	var allErrors error
	for _, r := range resources {
		if err := c.update(r.GetName(), state, nil); err != nil {
			allErrors = multierror.Append(allErrors, err)
			continue
		}
		if err := c.updateLocalResource(r, state, nil); err != nil {
			allErrors = multierror.Append(allErrors, err)
		}
	}
	return allErrors
}
func ( c * Client ) UpdateAll ( state string ) error { c . lock . Lock ( ) defer c . lock . Unlock ( ) resources , err := c . storage . List ( ) if err != nil { return err } if len ( resources ) == 0 { return fmt . Errorf ( " " ) } var allErrors error for _ , r := range resources { if err := c . update ( r . GetName ( ) , state , nil ) ; err != nil { allErrors = multierror . Append ( allErrors , err ) continue } if err := c . updateLocalResource ( r , state , nil ) ; err != nil { allErrors = multierror . Append ( allErrors , err ) } } return allErrors }
// UpdateAll signals update for all resources hold by the client.
UpdateAll signals update for all resources hold by the client .