// Set will store an item on the mock Keyring
168729
func (k *ArrayKeyring) Set(i Item) error {
	if k.items == nil {
		k.items = map[string]Item{}
	}
	k.items[i.Key] = i
	return nil
}
1155015
func (c *Context) Set(key string, value interface{}) {
	c.data[key] = value
}
700458
func (r *RedisStorer) Set(key, value string) error {
	return r.client.Set(key, value, r.maxAge).Err()
}
1056457
func (m *SyncMap) Set(key string, value interface{}) {
	shard := m.locate(key)
	shard.Lock()
	shard.items[key] = value
	shard.Unlock()
}
1054750
func (c *Scratch) Set(key string, value interface{}) string {
	c.mu.Lock()
	c.values[key] = value
	c.mu.Unlock()
	return ""
}
912247
func Set(key string, value interface{}, args ...interface{}) error {
	return std.Set(key, value, args...)
}
1530
func (m *MockVolumeDriver) Set(arg0 string, arg1 *api.VolumeLocator, arg2 *api.VolumeSpec) error {
	ret := m.ctrl.Call(m, "Set", arg0, arg1, arg2)
	ret0, _ := ret[0].(error)
	return ret0
}
1314964
func (ds *DataScope) Set(key string, v interface{}) error {
	ds.Data[key] = v
	return nil
}
197108
func (scope *ArgScope) Set(key string, v interface{}) error {
	str, ok := v.(string)
	if !ok {
		return fmt.Errorf("%v is not a string", v)
	}
	scope.data[key] = str
	return nil
}
912499
func (d *ResourceData) Set(key string, value interface{}) error {
	d.once.Do(d.init)

	// If the value is a pointer to a non-struct, get its value and
	// use that. This allows Set to take a pointer to primitives to
	// simplify the interface.
	reflectVal := reflect.ValueOf(value)
	if reflectVal.Kind() == reflect.Ptr {
		if reflectVal.IsNil() {
			// If the pointer is nil, then the value is just nil
			value = nil
		} else {
			// Otherwise, we dereference the pointer as long as its not
			// a pointer to a struct, since struct pointers are allowed.
			reflectVal = reflect.Indirect(reflectVal)
			if reflectVal.Kind() != reflect.Struct {
				value = reflectVal.Interface()
			}
		}
	}

	err := d.setWriter.WriteField(strings.Split(key, "."), value)
	if err != nil && d.panicOnError {
		panic(err)
	}
	return err
}
1157503
func (trie *Trie) Set(key Prefix, item Item) {
	trie.put(key, item, true)
}
938243
func (s *StringValue) Set(v string) error {
	if s.v == nil {
		s.v = new(string)
	}
	*(s.v) = v
	return nil
}
874956
func (r *Store) Set(key string, value interface{}) (Entry, bool) {
	return r.Save(key, value, false)
}
366276
func (h *multiHandler) Set(key string, value interface{}, args ...interface{}) error {
	lengthArgs := len(args)
	if lengthArgs > 0 && !h.Args() {
		return cfg.ErrArgsNotSupported
	}

	for _, handler := range h.handlers {
		switch {
		case lengthArgs != 0 && handler.Args():
			if err := handler.Set(key, value, args...); err == nil {
				return nil
			}
		default:
			if err := handler.Set(key, value); err == nil {
				return nil
			}
		}

	}
	return cfg.ErrKeyNotSet
}
1371907
func (l *ShardedNoTS) Set(tenantID, key string, val interface{}) error {
	_, ok := l.cache[tenantID]
	if !ok {
		l.cache[tenantID] = l.constructor()
		l.itemCount[tenantID] = 0
	}

	l.itemCount[tenantID]++
	return l.cache[tenantID].Set(key, val)
}
367667
func (c *Client) Set(item *Item) error {
	return c.onItem(item, (*Client).set)
}
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)
}