Skip to content
Snippets Groups Projects
Commit e70664f6 authored by ale's avatar ale
Browse files

drop third_party/ and use "godep"

parent 5bb10d25
Branches
No related tags found
No related merge requests found
Showing
with 82 additions and 18 deletions
...@@ -13,7 +13,7 @@ func (c *Client) Set(key string, value string, ttl uint64) (*Response, error) { ...@@ -13,7 +13,7 @@ func (c *Client) Set(key string, value string, ttl uint64) (*Response, error) {
return raw.Unmarshal() return raw.Unmarshal()
} }
// Set sets the given key to a directory. // SetDir sets the given key to a directory.
// It will create a new directory or replace the old key value pair by a directory. // It will create a new directory or replace the old key value pair by a directory.
// It will not replace a existing directory. // It will not replace a existing directory.
func (c *Client) SetDir(key string, ttl uint64) (*Response, error) { func (c *Client) SetDir(key string, ttl uint64) (*Response, error) {
......
// Copyright 2014 Gary Burd
//
// Licensed under the Apache License, Version 2.0 (the "License"): you may
// not use this file except in compliance with the License. You may obtain
// a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
// License for the specific language governing permissions and limitations
// under the License.
package redis
import (
"strings"
)
const (
watchState = 1 << iota
multiState
subscribeState
monitorState
)
type commandInfo struct {
set, clear int
}
var commandInfos = map[string]commandInfo{
"WATCH": {set: watchState},
"UNWATCH": {clear: watchState},
"MULTI": {set: multiState},
"EXEC": {clear: watchState | multiState},
"DISCARD": {clear: watchState | multiState},
"PSUBSCRIBE": {set: subscribeState},
"SUBSCRIBE": {set: subscribeState},
"MONITOR": {set: monitorState},
}
func lookupCommandInfo(commandName string) commandInfo {
return commandInfos[strings.ToUpper(commandName)]
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment