redis

package
v1.0.20 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package redis adds built-in Redis support with our common configuration. This will ensure that Go services using "github.com/skuid/spec" are in compliance with our infrastructure expectations.

The package provides two utilities for using Redis. NewStandardRedisClient generates a full-featured Redis client, with preconfigured connection settings from our spec. NewStandardRedisCache generates a more limited Redis cache interface which will automatically marshal and unmarshal into msgpack, also preconfigured with connection settings from our spec.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewStandardRedisCache

func NewStandardRedisCache(options *redis.Options) *cache.Codec

NewStandardRedisCache generates a preconfigured redis cache according to our spec, using msgpack for serialization format. Accepts an *redis.Options object, and overrides the Addr field to use `$REDIS_HOST:6379` instead

func NewStandardRedisClient

func NewStandardRedisClient(options *redis.Options) *redis.Client

NewStandardRedisClient generates a preconfigured redis client according to our spec. Accepts an *redis.Options object, and overrides the Addr field to use `$REDIS_HOST:6379` instead

Types

This section is empty.

Jump to

Keyboard shortcuts

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