// NotSet succeeds if Duration is not set.
512714
func (d *Duration) NotSet() *Duration {
	if d.value != nil {
		d.chain.fail("expected duration is not set, but it is")
	}
	return d
}
264038
func (eng *Engine) Set(name string, value interface{}, tags ...Tag) {
	eng.measure(time.Now(), name, value, Gauge, tags...)
}
137671
func (c *Client) Set(name string, value string, tags []string, rate float64) error {
	return c.send(name, value, setSuffix, tags, rate)
}
111597
func (self *Future) Set(val interface{}, err error) {
	self.mutex.Lock()
	defer self.mutex.Unlock()
	if self.received {
		return
	}
	self.received = true
	self.val = val
	self.err = err
	self.cond.Broadcast()
}
134685
func (mem *Memcache) Set(key string, val interface{}, timeout time.Duration) (err error) {
	var data []byte
	if data, err = json.Marshal(val); err != nil {
		return err
	}

	item := &memcache.Item{Key: key, Value: data, Expiration: int32(timeout / time.Second)}
	return mem.conn.Set(item)
}
810440
func (c *cache) Set(id types.UID, status *PodStatus, err error, timestamp time.Time) {
	c.lock.Lock()
	defer c.lock.Unlock()
	defer c.notify(id, timestamp)
	c.pods[id] = &data{status: status, err: err, modified: timestamp}
}
559274
func (f *future) set(instance loader.PluginInstance, err error) {
	f.instance = instance
	f.err = err
	close(f.waitCh)
}
653950
func (this *Server) Set(n string, v ...string) string {
	if len(v) == 0 {
		return this.settings[n]
	}
	this.settings[n] = v[0]
	return v[0]
}
744850
func (s *redisStore) Set(parent string, scopes []string, token string, TTL time.Duration) (err error) {
	// use expiry from parent token
	claims, err := claims.FromTokenWithoutValidation(parent)
	if err != nil {
		return err
	}

	// get ttl from token
	ttl := time.Unix(claims.ExpiresAt, 0).Sub(time.Now()) - TTLMargin

	// if TTL is explicitly set, use that one
	if TTL != time.Duration(0) {
		ttl = TTL
	}

	if ttl < time.Duration(0) {
		return nil
	}

	for _, scope := range scopes {
		err = s.client.Set(key(parent, scope), token, TTL).Err()
		if err != nil {
			return err
		}
	}

	return nil
}
721977
func (s *memcachedStorage) Set(key string, val interface{}, expires time.Duration) error {
	item := &cachedItem{Val: val}
	bytes, err := encodeGob(item)
	if err != nil {
		return err
	}

	var expiresInSeconds int64
	if expires != 0 {
		expiresInSeconds = int64(expires) / int64(time.Second)
	}

	memcachedItem := newItem(key, bytes, int32(expiresInSeconds))
	return s.c.Set(memcachedItem)
}
160024
func (d *Duration) Set(value string) (err error) {
	*d, err = ParseDuration(value)
	return
}
377958
func (s *StreamAddr) Set(v string) error {
	a, err := ParseURL(v)
	if err != nil {
		return err
	}
	*s = *a
	return nil
}
1094679
func (v *Gauge) Set(value int64) {
	v.Counter.i.Set(value)
}
771638
func (l *Legacy) Set(status bool, interval int) {
	l.Force = true
	l.Interval = time.Duration(interval) * time.Second
}
1349555
func (e *etcdClient) Set(key string, value []byte) error {
	duration := spanstat.Start()
	e.limiter.Wait(ctx.TODO())
	_, err := e.client.Put(ctx.Background(), key, string(value))
	increaseMetric(key, metricSet, "Set", duration.EndError(err).Total(), err)
	return Hint(err)
}
959400
func (fc *FakeClock) Set(end time.Time) {
	fc.Lock()
	fc.flush(end)

	if fc.now.Before(end) {
		fc.now = end
	}
	fc.Unlock()
	nap()
}
701349
func (d *Duration) IsSet() *Duration {
	if d.value == nil {
		d.chain.fail("expected duration is set, but it is not")
	}
	return d
}