MCPcopy Create free account
hub / github.com/cockroachdb/cockroachdb-parser / set

Method set

pkg/settings/duration.go:110–116  ·  view source on GitHub ↗
(ctx context.Context, sv *Values, v time.Duration)

Source from the content-addressed store, hash-verified

108}
109
110func (d *DurationSetting) set(ctx context.Context, sv *Values, v time.Duration) error {
111 if err := d.Validate(v); err != nil {
112 return err
113 }
114 sv.setInt64(ctx, d.slot, int64(v))
115 return nil
116}
117
118func (d *DurationSetting) decodeAndSet(ctx context.Context, sv *Values, encoded string) error {
119 v, err := d.DecodeValue(encoded)

Callers 2

decodeAndSetMethod · 0.95
setToDefaultMethod · 0.95

Calls 2

ValidateMethod · 0.95
setInt64Method · 0.80

Tested by

no test coverage detected