// StaySetVariablesDo performs the function f for all
// variables.
19517
func StaySetVariablesDo(f func(StaySetVariable)) error {
	monitor.RLock()
	defer monitor.RUnlock()
	return monitor.backend().StaySetVariablesDo(f)
}
327825
func (s *Stage) SetVariables(v map[string]*string) *Stage {
	s.Variables = v
	return s
}
138007
func (v *MrbValue) SetInstanceVariable(variable string, value *MrbValue) {
	cs := C.CString(variable)
	defer C.free(unsafe.Pointer(cs))
	C._go_mrb_iv_set(v.state, v.value, C.mrb_intern_cstr(v.state, cs), value.value)
}
30124
func readSettingsDocInto(db Database, collection, key string, out interface{}) error {
	col, closer := db.GetCollection(collection)
	defer closer()

	err := col.FindId(key).One(out)
	if err == mgo.ErrNotFound {
		err = errors.NotFoundf("settings")
	}
	return err
}
8729
func CopyBindVariables(bindVariables map[string]*querypb.BindVariable) map[string]*querypb.BindVariable {
	result := make(map[string]*querypb.BindVariable, len(bindVariables))
	for key, value := range bindVariables {
		result[key] = value
	}
	return result
}
1358912
func (s *sentinel) ObservablesDo(f func(o Observable) error) error {
	s.mux.Lock()
	defer s.mux.Unlock()
	var errs []error
	for observable := range s.observables {
		if err := f(observable); err != nil {
			errs = append(errs, err)
		}
	}
	if len(errs) > 0 {
		return errors.Collect(errs...)
	}
	return nil
}
763220
func (p *UNSUBSCRIBE) setVariableHeader() {
	// Append the Packet Identifier to the variable header.
	p.variableHeader = append(p.variableHeader, encodeUint16(p.PacketID)...)
}
1149163
func (obj *Doc) GetVariable(ctx context.Context, name string) (*Variable, error) {
	result := &struct {
		Return *ObjectInterface	`json:"qReturn"`
	} {}
	err := obj.rpc(ctx, "GetVariable", result, name)
	if err != nil {
		return nil, err
	}
	return &Variable{obj.session.getRemoteObject(result.Return)}, err 
}
627034
func (s *Service) DeleteVariable(ctx context.Context, id platform.ID) error {
	op := OpPrefix + platform.OpDeleteVariable
	_, err := s.FindVariableByID(ctx, id)
	if err != nil {
		return &platform.Error{
			Op:  op,
			Err: err,
		}
	}

	s.variableKV.Delete(id.String())

	return nil
}
238349
func (b *stdBackend) ReadVariable(id string) (StaySetVariable, error) {
	resp, err := b.command(cmdStaySetVariableRead, id)
	if err != nil {
		return nil, err
	}
	return resp.(StaySetVariable), nil
}
728437
func (s *VariableService) CreateVariable(ctx context.Context, m *platform.Variable) error {
	if err := m.Valid(); err != nil {
		return &platform.Error{
			Code: platform.EInvalid,
			Err:  err,
		}
	}

	url, err := newURL(s.Addr, variablePath)
	if err != nil {
		return err
	}

	octets, err := json.Marshal(m)
	if err != nil {
		return err
	}

	req, err := http.NewRequest("POST", url.String(), bytes.NewReader(octets))
	if err != nil {
		return err
	}

	req.Header.Set("Content-Type", "application/json")
	SetToken(s.Token, req)

	hc := newClient(url.Scheme, s.InsecureSkipVerify)

	resp, err := hc.Do(req)
	if err != nil {
		return err
	}
	defer resp.Body.Close()

	if err := CheckError(resp); err != nil {
		return err
	}

	return json.NewDecoder(resp.Body).Decode(m)
}
819136
func (c *Config) GetVariables() map[string]string {
	n := map[string]string{}
	for k, v := range c.variables {
		n[k] = v
	}
	return n
}
1312198
func SetVariablesFilter(f IDFilter) IDFilter {
	monitor.RLock()
	defer monitor.RUnlock()
	return monitor.backend().SetVariablesFilter(f)
}
838192
func (f *FSMContext) Stay(data interface{}, decisions []Decision) Outcome {
	return StayOutcome{
		data:      data,
		decisions: decisions,
	}
}
813404
func (scope *EvalScope) SetVariable(name, value string) error {
	t, err := parser.ParseExpr(name)
	if err != nil {
		return err
	}

	xv, err := scope.evalAST(t)
	if err != nil {
		return err
	}

	if xv.Addr == 0 {
		return fmt.Errorf("Can not assign to \"%s\"", name)
	}

	if xv.Unreadable != nil {
		return fmt.Errorf("Expression \"%s\" is unreadable: %v", name, xv.Unreadable)
	}

	t, err = parser.ParseExpr(value)
	if err != nil {
		return err
	}

	yv, err := scope.evalAST(t)
	if err != nil {
		return err
	}

	return xv.setValue(yv, value)
}
25673
func (g *Virtual) Keep(edge FilterFunc) *Virtual {
	n := g.order
	switch {
	case n == 0:
		return null
	case n == 1:
		return singleton()
	case edge == nil:
		return g
	}
	res := generic(g.order, g.cost, func(v, w int) bool {
		return edge(v, w) && g.edge(v, w)
	})
	res.visit = func(v int, a int, do func(w int, c int64) bool) (aborted bool) {
		return g.visit(v, a, func(w int, c int64) bool {
			return edge(v, w) && do(w, c)
		})
	}
	return res
}
1362857
func SetVariableDefault(variable, value string) {
	if v := pprofVariables[variable]; v != nil {
		v.value = value
	}
}