Documentation ¶
Index ¶
- type Connector
- func (rc *Connector) DBFlush(module string) error
- func (rc *Connector) DelEntry(key string) error
- func (rc *Connector) EntryExists(key string) bool
- func (rc *Connector) ForEachEntry(keyMatchStr string, ...) error
- func (rc *Connector) ForEachJSONEntry(keyMatchStr string, entryHandler func(string, string, interface{}) error, ...) error
- func (rc *Connector) ForEachKey(keyMatchStr string, keyHandler func(string, interface{}) error, ...) error
- func (rc *Connector) GetEntry(key string) (map[string]string, error)
- func (rc *Connector) JSONDelEntry(key string, path string) error
- func (rc *Connector) JSONGetEntry(key string, path string) (string, error)
- func (rc *Connector) JSONSetEntry(key string, path string, json string) error
- func (rc *Connector) Listen(handler func(string, string)) error
- func (rc *Connector) Publish(channel string, message string) error
- func (rc *Connector) SetEntry(key string, fields map[string]interface{}) error
- func (rc *Connector) StopListen()
- func (rc *Connector) Subscribe(channels ...string) error
- func (rc *Connector) Unsubscribe(channels ...string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Connector ¶
type Connector struct {
// contains filtered or unexported fields
}
Connector - Implements a Redis connector
func NewConnector ¶
NewConnector - Creates and initialize a Redis connector
func (*Connector) EntryExists ¶
EntryExists - true if entry exists; false otherwise
func (*Connector) ForEachEntry ¶
func (rc *Connector) ForEachEntry(keyMatchStr string, entryHandler func(string, map[string]string, interface{}) error, userData interface{}) error
ForEachEntry - Search for matching keys and run handler for each entry
func (*Connector) ForEachJSONEntry ¶
func (*Connector) ForEachKey ¶
func (rc *Connector) ForEachKey(keyMatchStr string, keyHandler func(string, interface{}) error, userData interface{}) error
ForEachKey - Search for matching keys and run handler for each key
func (*Connector) JSONDelEntry ¶
JSONDelEntry - delete an existing entry from DB
func (*Connector) JSONGetEntry ¶
JSONGetEntry - Retrieve entry from DB
func (*Connector) JSONSetEntry ¶
JSONSetEntry - update existing entry from DB or create a new one if it doesnt't exist
func (*Connector) SetEntry ¶
SetEntry - Update existing entry or create new entry if it does not exist
func (*Connector) StopListen ¶
func (rc *Connector) StopListen()
StopListen - Stop the listening goroutine
func (*Connector) Unsubscribe ¶
Unsubscribe - Unregister as a listener for provided channels