Documentation ¶
Index ¶
- Variables
- func Connect(c *Config) error
- func Get(key string) ([]byte, error)
- func GetJson(key string, j interface{}) error
- func Prefix(key string) (map[string][]byte, error)
- func Set(key string, val interface{}) error
- func SetEx(key string, val interface{}, timeout time.Duration) error
- func SetWithLock(key string, val interface{}) error
- func Watch(key string, wg *sync.WaitGroup, logic func(event *Event))
- func WatchPrefix(key string, wg *sync.WaitGroup, logic func(event *Event))
- func WhenLocked(key string, logic func(client *Client, key string) error) error
- type Client
- func (p *Client) Close() error
- func (p *Client) Del(key string) error
- func (p *Client) Exist(key string) (bool, error)
- func (p *Client) Get(key string) ([]byte, error)
- func (p *Client) GetJson(key string, j interface{}) error
- func (p *Client) Prefix(key string) (map[string][]byte, error)
- func (p *Client) Set(key string, val interface{}) error
- func (p *Client) SetEx(key string, val interface{}, timeout time.Duration) error
- func (p *Client) SetWithLock(key string, val interface{}) error
- func (p *Client) Watch(key string, wg *sync.WaitGroup, logic func(event *Event))
- func (p *Client) WatchPrefix(key string, wg *sync.WaitGroup, logic func(event *Event))
- func (p *Client) WhenLocked(key string, logic func(client *Client, key string) error) error
- type Config
- type Event
- type EventType
- type Mutex
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNotFound = errors.New("key not found")
)
Functions ¶
func SetWithLock ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) SetWithLock ¶
func (*Client) WatchPrefix ¶
type Config ¶
type Config struct {
Address []string `` /* 147-byte string literal not displayed */
}
type Mutex ¶
type Mutex struct {
// contains filtered or unexported fields
}
func NewMutexWithClient ¶
func (*Mutex) WhenLocked ¶
Click to show internal directories.
Click to hide internal directories.