// Dynamic returns the offset of the first non-constant operand of ref.
977922
func (ref Ref) Dynamic() int {
	for i := 1; i < len(ref); i++ {
		if !IsConstant(ref[i].Value) {
			return i
		}
	}
	return -1
}
832725
func (cfgSrcHandler *Handler) DynamicConfigHandler(callback core.DynamicConfigCallback) error {
	if cfgSrcHandler.initSuccess != true {
		return errors.New("config center source initialization failed")
	}

	dynCfgHandler, err := newDynConfigHandlerSource(cfgSrcHandler, callback)
	if err != nil {
		openlogging.GetLogger().Error("failed to initialize dynamic config center Handler:" + err.Error())
		return errors.New("failed to initialize dynamic config center Handler")
	}
	cfgSrcHandler.dynamicConfigHandler = dynCfgHandler

	if cfgSrcHandler.RefreshMode == 0 {
		// Pull All the configuration for the first time.
		cfgSrcHandler.refreshConfigurations("")
		//Start a web socket connection to recieve change events.
		dynCfgHandler.startDynamicConfigHandler()
	}

	return nil
}
742582
func (o *Offset) Set(offset interface{}) error {
	n, err := NewOffset(offset)

	if err == nil {
		*o = n
	}

	return err
}
159672
func DynamicStatusValuesDo(f func(DynamicStatusValue)) error {
	monitor.RLock()
	defer monitor.RUnlock()
	return monitor.backend().DynamicStatusValuesDo(f)
}
25238
func (db *Database) Reference(child common.Hash, parent common.Hash) {
	db.lock.Lock()
	defer db.lock.Unlock()

	db.reference(child, parent)
}
1006284
func convertOffset(offset interface{}) (uint64, error) {
	switch offset.(type) {
	case uint64:
		return offset.(uint64), nil
	case float64:
		return uint64(offset.(float64)), nil
	case json.Number:
		return strconv.ParseUint(string(offset.(json.Number)), 10, 64)
	}

	// An unexpected type. We'll get the type name for the error, but this
	// will fail the export.. so it only uses reflect once.
	name := reflect.TypeOf(offset)
	return 0, &UnknownElasticStructError{fmt.Sprintf("%v", name), "offset"}
}
850731
func (t *Array) Select(pos int) Type {
	if len(t.static) > pos {
		return t.static[pos]
	}
	if t.dynamic != nil {
		return t.dynamic
	}
	return nil
}
162927
func (cs Set) Ref() string {
	domain, _, ref := cs.Split()
	if domain == "projects" {
		return ref
	}
	return ""
}
759772
func (bldr *SampleQueryBuilder) Offset(offset int) *SampleQueryBuilder {
	bldr.q = bldr.q.Offset(offset)
	if bldr.plugin != nil {
		bldr.plugin.Offset(offset)
	}
	return bldr
}
442516
func (o *Buffer) dec_ref_string(p *Properties, base structPointer) error {
	s, err := o.DecodeStringBytes()
	if err != nil {
		return err
	}
	*structPointer_RefString(base, p.field) = s
	return nil
}
830274
func GetDynamicPluginProber(pluginDir string, runner exec.Interface) volume.DynamicPluginProber {
	return flexvolume.GetDynamicPluginProber(pluginDir, runner)
}
1106694
func (b *Builder) AddDynamicField(name string, fn func() interface{}) error {
	b.dynFieldsLock.Lock()
	defer b.dynFieldsLock.Unlock()
	dynFn := dynamicField{
		name: name,
		fn:   fn,
	}
	b.dynFields = append(b.dynFields, dynFn)
	return nil
}
374524
func NewValuesFunc(offset int, retTp *types.FieldType, ctx context.Context) *ScalarFunction {
	bt := &builtinValuesSig{newBaseBuiltinFunc(nil, ctx), offset}
	return &ScalarFunction{
		FuncName: model.NewCIStr(ast.Values),
		RetType:  retTp,
		Function: bt,
	}
}
491307
func Ref(ref interface{}) interface{} {
	switch v := ref.(type) {
	case NamedResource:
		ref = v.Name
	}
	return map[string]interface{}{"Ref": ref}
}
1297355
func (p *Personalization) SetDynamicTemplateData(key string, value interface{}) {
	p.DynamicTemplateData[key] = value
}
833167
func (q *TransactionQuery) Offset(amount uint) *TransactionQuery {
	q.query.Offset(amount)
	return q
}
378500
func (a *DateHistogramAggregation) Offset(offset string) *DateHistogramAggregation {
	a.offset = offset
	return a
}