// SetChangedFunc sets a handler which is called whenever the text of the input
// field has changed. It receives the current text (after the change).
167055
func (i *InputField) SetChangedFunc(handler func(text string)) *InputField {
	i.changed = handler
	return i
}
1050329
func (s *CreateWebACLOutput) SetChangeToken(v string) *CreateWebACLOutput {
	s.ChangeToken = &v
	return s
}
105952
func (b *UpdateBuilder) SetFunc(column string, fn *Func) *UpdateBuilder {
	b.assignments = append(b.assignments, assignment{column: column, value: fn})
	return b
}
1102513
func (s *Settings) SetIfChanged(c context.Context, key string, value interface{}, who, why string) error {
	// 'value' must be a pointer to a struct. Construct a zero value of this
	// kind of struct.
	typ := reflect.TypeOf(value)
	if typ.Kind() != reflect.Ptr || typ.Elem().Kind() != reflect.Struct {
		return ErrBadType
	}
	existing := reflect.New(typ.Elem()).Interface()

	// Fetch existing settings and compare.
	switch err := s.GetUncached(c, key, existing); {
	case err != nil && err != ErrNoSettings:
		return err
	case reflect.DeepEqual(existing, value):
		return nil
	}

	// Log the change. Ignore JSON marshaling errors, they are not essential
	// (and must not happen anyway).
	existingJSON, _ := json.Marshal(existing)
	modifiedJSON, _ := json.Marshal(value)
	logging.Warningf(c, "Settings %q changed from %s to %s by %q", key, existingJSON, modifiedJSON, who)

	return s.Set(c, key, value, who, why)
}
1025342
func (g Gauge) SetFunc(f func() int64) {
	gm.Lock()
	defer gm.Unlock()

	gauges[string(g)] = f
}
266601
func (b *UpdateBuilder) AddFunc(column string, fn *Func) *UpdateBuilder {
	return b.addValue(column, fn)
}
1063570
func (s *DeleteRegexMatchSetInput) SetChangeToken(v string) *DeleteRegexMatchSetInput {
	s.ChangeToken = &v
	return s
}
1243011
func (i *InputField) SetFinishedFunc(handler func(key tcell.Key)) FormItem {
	i.finished = handler
	return i
}
1257829
func (s *DeleteRegexMatchSetOutput) SetChangeToken(v string) *DeleteRegexMatchSetOutput {
	s.ChangeToken = &v
	return s
}
651983
func (s *CreateRuleGroupOutput) SetChangeToken(v string) *CreateRuleGroupOutput {
	s.ChangeToken = &v
	return s
}
225413
func (s *UserPendingChanges) SetPendingChange(v string) *UserPendingChanges {
	s.PendingChange = &v
	return s
}
455029
func Changefeed(ctx context.Context, w http.ResponseWriter, r *http.Request) error {
	var (
		vars                = mux.Vars(r)
		logger              = ctxu.GetLogger(ctx)
		qs                  = r.URL.Query()
		gun                 = vars["gun"]
		changeID            = qs.Get("change_id")
		store, records, err = checkChangefeedInputs(logger, ctx.Value(notary.CtxKeyMetaStore), qs.Get("records"))
	)
	if err != nil {
		// err already logged and in correct format.
		return err
	}
	out, err := changefeed(logger, store, gun, changeID, records)
	if err == nil {
		w.Write(out)
	}
	return err
}
707335
func (s *GetChangeOutput) SetChangeInfo(v *ChangeInfo) *GetChangeOutput {
	s.ChangeInfo = v
	return s
}
561548
func (s *DeleteGeoMatchSetOutput) SetChangeToken(v string) *DeleteGeoMatchSetOutput {
	s.ChangeToken = &v
	return s
}
515947
func (t *TreeView) SetChangedFunc(handler func(node *TreeNode)) *TreeView {
	t.changed = handler
	return t
}
713046
func (s *DeleteRuleGroupInput) SetChangeToken(v string) *DeleteRuleGroupInput {
	s.ChangeToken = &v
	return s
}
892785
func (s *GetChangeTokenOutput) SetChangeToken(v string) *GetChangeTokenOutput {
	s.ChangeToken = &v
	return s
}