// Set writes the provided data under the given identifier.
439110
func (s *GRPCStorage) Set(ctx context.Context, msg *SetMsg) (*google_protobuf.Empty, error) {
	logrus.Debugf("storing: %s", msg.FileName)
	err := s.backend.Set(msg.FileName, msg.Data)
	if err != nil {
		logrus.Errorf("failed to store: %s", err.Error())
	}
	return &google_protobuf.Empty{}, err
}
281274
func (v *storageIdValue) Set(value string) error {
	if !names.IsValidStorage(value) {
		return errors.Errorf("invalid storage ID %q", value)
	}
	tag := names.NewStorageTag(value)
	if _, err := v.ctx.Storage(tag); err != nil {
		return errors.Trace(err)
	}
	*v.result = tag
	return nil
}
1300413
func (d *diffTypes) Set(value string) error {
	// Dedupe repeated elements.
	for _, t := range *d {
		if t == value {
			return nil
		}
	}
	*d = append(*d, value)
	return nil
}
681473
func (f *Int64Slice) Set(value string) error {
	tmp, err := strconv.ParseInt(value, 10, 64)
	if err != nil {
		return err
	}
	*f = append(*f, tmp)
	return nil
}
684254
func (ia *IntValue) Set(s string) error {
	i, err := strconv.ParseInt(s, 10, 64)
	if err != nil {
		return err
	}
	*ia = IntValue(int(i))
	return nil
}
730308
func (v *Value) Set(s string) error {
	b, err := DecodeString(s)
	if err != nil {
		return err
	}
	*v = b
	return nil
}
176392
func (s *SystemInfo) Set(name string, val string) {
	s.GetSet.Set(s, name, val)
}
1235055
func (list *List) Set(idx int, value Value) {
	list.values[idx] = value
}
1007241
func (i *Uint32) Set(value uint32) {
	i.lock.Lock()
	defer i.lock.Unlock()
	i.increment = value
}
788723
func (u *Uint64) Set(s string) error {
	v, err := strconv.ParseUint(s, 0, 64)
	*u = Uint64(v)
	return err
}
1358372
func (ns *NullString) Set(value interface{}) error {

	ns.valid = false
	ns.value = ""

	if value == nil {
		return nil
	}

	ns.valid = true
	ns.value = fmt.Sprint(value)

	return nil
}
859791
func (ia *Floats64Value) Set(s string) error {
	i, err := strconv.ParseFloat(s, 64)
	if err != nil {
		return err
	}
	*ia = append(*ia, i)
	return nil
}
799274
func (m *MyID) Set(key int, value string) {
	m.Lock()
	m.logCache[key] = value
	m.Unlock()
}
1289735
func (um *UserMap) Set(id string, user User) error {
	um.Lock()

	// initialize user.Options if nothing's in there yet
	if user.Options == nil {
		user.Options = make(map[string]interface{})
	}
	um.Map[id] = user
	if err := um.Save(); err != nil {
		um.Unlock()
		return err
	}

	um.Unlock()
	return nil
}
178962
func (i *Int) Set(value int) {
	i.lock.Lock()
	defer i.lock.Unlock()
	i.increment = value
}
981385
func (f *fileStorage) Set(key string, value []byte) error {
	file, err := f.fileForWrite(key)

	if err != nil {
		return err
	}

	defer file.Close()

	_, err = file.Write(value)
	return err
}
137671
func (c *Client) Set(name string, value string, tags []string, rate float64) error {
	return c.send(name, value, setSuffix, tags, rate)
}