redis

package
v0.1.0-alpha.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 22, 2022 License: MIT Imports: 12 Imported by: 0

README

Package redis

Package redis provides a driver to work with the Redis DBMS.

Authentication configuration

See the package reference for details.

Documentation

Overview

Package redis provides a driver to work with the Redis DBMS.

Authentication configuration

DFI components which use Redis server that requires authentication must provide authentication data (user and password values). This is done using component-specific configuration files. In general, these files contain a section with a JSON object that contains the "user" and "password" fields.

For example:

{
  "user": "redis-username",
  "password": "redis-password"
}

See the component's README file for more information.

Index

Constants

View Source
const (
	RedisMaxScanKeys = 1024 * 10

	// Redis namespace prefixes
	RedisObjPrefix     = "obj:"
	RedisAIIPrefix     = "aii:"
	RedisAIIDMetaPefix = "aii-meta:"
	RedisAIIDSetPrefix = RedisAIIDMetaPefix + "set-"

	// Error value of redis.Get* function when requested data is not found
	RedisNotFound = redis.Nil
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	*dbms.CommonClient
	// contains filtered or unexported fields
}

func NewClient

func NewClient(dbCfg *dbms.DBConfig) (*Client, error)

func (*Client) Commit

func (rc *Client) Commit() (int64, int64, error)

func (*Client) DeleteFPathPref

func (rc *Client) DeleteFPathPref(fso *types.FSObject) (int64, error)

func (*Client) DeleteObj

func (rc *Client) DeleteObj(fso *types.FSObject) error

func (*Client) GetAIIIds

func (rc *Client) GetAIIIds(withFields []string) ([]string, error)

func (*Client) GetAIIs

func (rc *Client) GetAIIs(ids, retFields []string) (dbms.QueryResultsAII, error)

func (*Client) GetObjects

func (rc *Client) GetObjects(ids, retFields []string) (dbms.QueryResults, error)

func (*Client) LoadHostPaths

func (rc *Client) LoadHostPaths(match dbms.MatchStrFunc) ([]string, error)

func (*Client) ModifyAII

func (rc *Client) ModifyAII(op dbms.DBOperator, args *dbms.AIIArgs, ids []string, add bool) (int64, int64, error)

func (*Client) Query

func (rc *Client) Query(qa *dbms.QueryArgs, retFields []string) (dbms.QueryResults, error)

func (*Client) QueryAIIIds

func (rc *Client) QueryAIIIds(qa *dbms.QueryArgs) ([]string, error)

func (*Client) UpdateObj

func (rc *Client) UpdateObj(fso *types.FSObject) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL