1
0
mirror of https://github.com/redis/go-redis.git synced 2025-07-29 17:41:15 +03:00

Add ForEachMaster API.

This commit is contained in:
Vladimir Mihailenco
2016-06-17 12:09:38 +00:00
parent 06f3f8ebf0
commit 4761c24218
8 changed files with 133 additions and 64 deletions

View File

@ -22,10 +22,11 @@ type Pipeline struct {
closed int32
}
func (pipe *Pipeline) Process(cmd Cmder) {
func (pipe *Pipeline) Process(cmd Cmder) error {
pipe.mu.Lock()
pipe.cmds = append(pipe.cmds, cmd)
pipe.mu.Unlock()
return nil
}
// Close closes the pipeline, releasing any open resources.