redis

package
v0.0.0-...-f54e1bb Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2024 License: BSD-3-Clause Imports: 3 Imported by: 1

README

redis

import "github.com/blueprint-uservices/blueprint/runtime/plugins/redis"

Package redis implements a key-value [backend.Cache] client interface to a vanilla redis implementation.

Index

type RedisCache

A redis client wrapper that implements the [backend.Cache] interface

type RedisCache struct {
    // contains filtered or unexported fields
}

func NewRedisCacheClient
func NewRedisCacheClient(ctx context.Context, addr string) (*RedisCache, error)

Instantiates a new redis client to a memcached instance running at `serverAddress`

func (*RedisCache) Delete
func (r *RedisCache) Delete(ctx context.Context, key string) error

Implements the backend.Cache interface

func (*RedisCache) Get
func (r *RedisCache) Get(ctx context.Context, key string, value interface{}) (bool, error)

Implements the backend.Cache interface

func (*RedisCache) Incr
func (r *RedisCache) Incr(ctx context.Context, key string) (int64, error)

Implements the backend.Cache interface

func (*RedisCache) Mget
func (r *RedisCache) Mget(ctx context.Context, keys []string, values []interface{}) error

Implements the backend.Cache interface

func (*RedisCache) Mset
func (r *RedisCache) Mset(ctx context.Context, keys []string, values []interface{}) error

Implements the backend.Cache interface

func (*RedisCache) Put
func (r *RedisCache) Put(ctx context.Context, key string, value interface{}) error

Implements the backend.Cache interface

Generated by gomarkdoc

Documentation

Overview

Package redis implements a key-value [backend.Cache] client interface to a vanilla redis implementation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RedisCache

type RedisCache struct {
	// contains filtered or unexported fields
}

A redis client wrapper that implements the [backend.Cache] interface

func NewRedisCacheClient

func NewRedisCacheClient(ctx context.Context, addr string) (*RedisCache, error)

Instantiates a new redis client to a memcached instance running at `serverAddress`

func (*RedisCache) Delete

func (r *RedisCache) Delete(ctx context.Context, key string) error

Implements the backend.Cache interface

func (*RedisCache) Get

func (r *RedisCache) Get(ctx context.Context, key string, value interface{}) (bool, error)

Implements the backend.Cache interface

func (*RedisCache) Incr

func (r *RedisCache) Incr(ctx context.Context, key string) (int64, error)

Implements the backend.Cache interface

func (*RedisCache) Mget

func (r *RedisCache) Mget(ctx context.Context, keys []string, values []interface{}) error

Implements the backend.Cache interface

func (*RedisCache) Mset

func (r *RedisCache) Mset(ctx context.Context, keys []string, values []interface{}) error

Implements the backend.Cache interface

func (*RedisCache) Put

func (r *RedisCache) Put(ctx context.Context, key string, value interface{}) error

Implements the backend.Cache interface

Jump to

Keyboard shortcuts

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