// Set performs a set request on the remote backend
501879
func (h Handler) Set(cmd common.SetRequest) error {
	if err := binprot.WriteSetCmd(h.rw.Writer, cmd.Key, cmd.Flags, cmd.Exptime, uint32(len(cmd.Data)), 0); err != nil {
		return err
	}
	return h.handleSetCommon(cmd)
}
743637
func (ip *Interpreter) set(args []string) {
	ip.simpleResponder(ip.Backend.SetUserData(args[0], args[1], args[2]))
}
745953
func (s *AttributeValue) SetS(v string) *AttributeValue {
	s.S = &v
	return s
}
1304925
func Set(overseer Overseer, w http.ResponseWriter, r *http.Request, key string, value string) error {
	var sess session
	sessMap := make(map[string]string)

	val, err := overseer.Get(w, r)
	if err != nil && !IsNoSessionError(err) {
		return errors.Wrap(err, "unable to get session")
	}

	if !IsNoSessionError(err) {
		err = json.Unmarshal([]byte(val), &sess)
		if err != nil {
			return errors.Wrap(err, "unable to unmarshal session object")
		}

		if sess.Value != nil {
			err = json.Unmarshal(*sess.Value, &sessMap)
			if err != nil {
				return errors.Wrap(err, "unable to unmarshal session map value")
			}
		}
	}

	sessMap[key] = value

	mv, err := json.Marshal(sessMap)
	if err != nil {
		return errors.Wrap(err, "unable to marshal session map value")
	}
	sess.Value = (*json.RawMessage)(&mv)

	ret, err := json.Marshal(sess)
	if err != nil {
		return errors.Wrap(err, "unable to marshal session object")
	}

	return overseer.Set(w, r, string(ret))
}
574082
func (c *syncClient) Set(arg0 string, arg1 []byte) (err Error) {
	arg0bytes := []byte(arg0)
	arg1bytes := arg1

	_, err = c.conn.ServiceRequest(&SET, [][]byte{arg0bytes, arg1bytes})
	return
}
469862
func (n *Nodes) Set(node string) error {
	*n = append(*n, node)
	return nil
}
189054
func (cache *Cache) Set(key string, image *imageserver.Image, params imageserver.Params) error {
	item := &item{
		image: image,
	}
	cache.lru.Set(key, item)
	return nil
}
184286
func (this *Response) Set(f string, v string) {
	if v == "" {
		this.RemoveHeader(f)
	} else {
		this.SetHeader(f, v)
	}
}
1253138
func (b *BytesRefBuilder) Set(offset int, v byte) {
	b.ref.Bytes[offset] = v
}
585883
func (u *streamServerURI) Set(v string) error {
	uri := streamServerURI(v)
	if _, err := uri.resolve(context.Background()); err != nil {
		return err
	}
	*u = uri
	return nil
}
1250826
func (c *APIContext) Set(key string, value interface{}) {
	if c.keys == nil {
		c.keys = make(map[string]interface{})
	}
	c.keys[key] = value
}
562387
func Set(service, username, password string) error {
	p, err := setupProvider()
	if err != nil {
		return err
	}

	return p.Set(service, username, password)
}
714880
func (s *PostgresStore) Set(key, value interface{}) error {
	s.lock.Lock()
	defer s.lock.Unlock()

	s.data[key] = value
	return nil
}
795311
func (o *GetObjectOptions) Set(key, value string) {
	if o.headers == nil {
		o.headers = make(map[string]string)
	}
	o.headers[http.CanonicalHeaderKey(key)] = value
}
985941
func (u *URI) Set(value string) error {
	uri, err := NewURIFromAddress(value)
	if err != nil {
		return err
	}
	*u = *uri
	return nil
}
1164442
func (r *GroupPercentService) Set(appId string, id string, grouppercent *GroupPercent) *GroupPercentSetCall {
	c := &GroupPercentSetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
	c.appId = appId
	c.id = id
	c.grouppercent = grouppercent
	return c
}
1089794
func Set(servers map[string]string) p.Plugin {
	return p.NewRequestPlugin(func(ctx *c.Context, h c.Handler) {
		// Assert http.Transport to work with the instance
		transport, ok := ctx.Client.Transport.(*http.Transport)
		if !ok {
			// If using a custom transport, just ignore it
			h.Next(ctx)
			return
		}

		// Define the proxy function to be used during the transport
		transport.Proxy = func(req *http.Request) (*url.URL, error) {
			if value, ok := servers[req.URL.Scheme]; ok {
				return url.Parse(value)
			}
			return http.ProxyFromEnvironment(req)
		}

		// Override the transport
		ctx.Client.Transport = transport
		h.Next(ctx)
	})
}