// Redis BRPOPLPUSH command.
334526
func (c *asyncClient) Brpoplpush(arg0 string, arg1 string, timeout int) (result FutureBytesArray, err Error) {
	arg0bytes := []byte(arg0)
	arg1bytes := []byte(arg1)
	arg2bytes := []byte(fmt.Sprint(timeout))

	var resp *PendingResponse
	resp, err = c.conn.QueueRequest(&BRPOPLPUSH, [][]byte{arg0bytes, arg1bytes, arg2bytes})
	if err == nil {
		result = resp.future.(FutureBytesArray)
	}
	return result, err

}
385379
func (rb *reorderBuffer) insertFlush(src input, i int, info Properties) insertErr {
	if rune := src.hangul(i); rune != 0 {
		rb.decomposeHangul(rune)
		return iSuccess
	}
	if info.hasDecomposition() {
		return rb.insertDecomposed(info.Decomposition())
	}
	rb.insertSingle(src, i, info)
	return iSuccess
}
185842
func (c CloudstackClient) QueryAsyncJobResult(jobid string) (QueryAsyncJobResultResponse, error) {
	var resp QueryAsyncJobResultResponse

	params := url.Values{}
	params.Set("jobid", jobid)
	response, err := NewRequest(c, "queryAsyncJobResult", params)

	if err != nil {
		return resp, err
	}

	resp = response.(QueryAsyncJobResultResponse)

	return resp, nil
}
1323103
func (s *RedisSetStore) GetAll(keys []string, options *ListOptions) (map[string][]string, error) {
	if len(keys) == 0 {
		return map[string][]string{}, nil
	}

	for i, key := range keys {
		if !strings.HasPrefix(key, s.prefix) {
			keys[i] = s.prefix + key
		}
	}

	sort.Strings(keys)

	selectedKeys := selectKeys(keys, options)
	if len(selectedKeys) == 0 {
		return map[string][]string{}, nil
	}

	pipe := s.client.Pipeline()
	defer pipe.Close()

	// Add all commands to pipeline
	cmds := make(map[string]*redis.StringSliceCmd)
	for _, key := range selectedKeys {
		cmds[key] = pipe.SMembers(key)
	}

	// Execute pipeline
	_, err := pipe.Exec()
	if err != nil {
		return nil, err
	}

	// Get all results from pipeline
	data := make(map[string][]string)
	for key, cmd := range cmds {
		res, err := cmd.Result()
		if err == nil {
			sort.Strings(res)
			data[strings.TrimPrefix(key, s.prefix)] = res
		}
	}

	return data, nil
}
548474
func (c *syncClient) Lpush(arg0 string, arg1 []byte) (err Error) {
	arg0bytes := []byte(arg0)
	arg1bytes := arg1

	_, err = c.conn.ServiceRequest(&LPUSH, [][]byte{arg0bytes, arg1bytes})
	return
}
1175685
func (r *Redis) EvalSha(sha1 string, keys []string, args []string) (*Reply, error) {
	cmds := packArgs("EVALSHA", sha1, len(keys), keys, args)
	return r.ExecuteCommand(cmds...)
}
693668
func (s *Action) GitPush(ctx context.Context, c *cli.Context) error {
	store := c.String("store")
	origin := c.Args().Get(0)
	branch := c.Args().Get(1)

	if origin == "" || branch == "" {
		return ExitError(ctx, ExitUsage, nil, "Usage: %s git push <ORIGIN> <BRANCH>", s.Name)
	}
	return s.Store.GitPush(ctx, store, origin, branch)
}
372400
func (c *Client) SyncedFlush(indices ...string) *IndicesSyncedFlushService {
	return NewIndicesSyncedFlushService(c).Index(indices...)
}
314665
func (l *Logger) PopPrefix() {
	if len(l.prefixStack) == 0 {
		l.Debug("popped from empty stack")
		return
	}
	l.prefixStack = l.prefixStack[:len(l.prefixStack)-1]
}
615027
func (c *Client) RPopLPush(source string, destination string) (string, error) {
	var ret string

	err := c.command(
		&ret,
		[]byte("RPOPLPUSH"),
		[]byte(source),
		[]byte(destination),
	)

	return ret, err
}
1052956
func buildJobStatusHandler(ctx context.Context) (JobStatusHandler, error) {

	jobStatus := JobStatusHandler{}

	pfconfigdriver.PfconfigPool.AddStruct(ctx, &redisclient.Config)
	var network string
	if redisclient.Config.RedisArgs.Server[0] == '/' {
		network = "unix"
	} else {
		network = "tcp"
	}

	jobStatus.redis = redis.NewClient(&redis.Options{
		Addr:    redisclient.Config.RedisArgs.Server,
		Network: network,
	})

	router := httprouter.New()
	router.GET("/api/v1/pfqueue/task/:job_id/status", jobStatus.handleStatus)
	router.GET("/api/v1/pfqueue/task/:job_id/status/poll", jobStatus.handleStatusPoll)

	jobStatus.router = router

	return jobStatus, nil
}
637227
func (h *interfaces) PopAll() []interface{} {
	for n := h.Len(); n > 1; n-- {
		PopToLastF(n, h.less, func(i, j int) { h.list[i], h.list[j] = h.list[j], h.list[i] })
	}
	res := h.list
	h.list = nil
	return res
}
851227
func (job *RescanJob) batch() *rescanBatch {
	return &rescanBatch{
		initialSync: job.InitialSync,
		addrs:       job.Addrs,
		outpoints:   job.OutPoints,
		bs:          job.BlockStamp,
		errChans:    []chan error{job.err},
	}
}
308793
func (t *transaction) command(name string, args redis.Args, handler replyHandler) {
	t.actions = append(t.actions, &action{
		kind:    actionCommand,
		name:    name,
		args:    args,
		handler: handler,
	})
}
99515
func (c *syncClient) Rpop(arg0 string) (result []byte, err Error) {
	arg0bytes := []byte(arg0)

	var resp Response
	resp, err = c.conn.ServiceRequest(&RPOP, [][]byte{arg0bytes})
	if err == nil {
		result = resp.GetBulkData()
	}
	return result, err

}
556229
func (c *asyncClient) Flushall() (stat FutureBool, err Error) {
	resp, err := c.conn.QueueRequest(&FLUSHALL, [][]byte{})
	if err == nil {
		stat = resp.future.(FutureBool)
	}

	return
}
356743
func (c *Command) GenZshCompletion(w io.Writer) error {
	buf := new(bytes.Buffer)

	writeHeader(buf, c)
	maxDepth := maxDepth(c)
	writeLevelMapping(buf, maxDepth)
	writeLevelCases(buf, maxDepth, c)

	_, err := buf.WriteTo(w)
	return err
}