cache

package
v0.0.0-...-f6ca644 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Memcached variable
	Memcached MemcachedConf
	// Redis variable
	Redis RedisConf
)

Mc variable

Rd variable

Functions

func McConnect

func McConnect(resourceName string) *persistence.MemcachedStore

McConnect function

func RdConnect

func RdConnect(resourceName string) *persistence.RedisStore

RdConnect function

Types

type MemcachedConf

type MemcachedConf struct {
	CacheOptions []MemcachedOption `json:"memcachedResources" bson:"memcachedResources"`
}

MemcachedConf struct

type MemcachedOption

type MemcachedOption struct {
	Name          string   `json:"name" bson:"name"`
	Host          []string `json:"host" bson:"host"`
	ExpirationSec int      `json:"expiration" bson:"expiration"`
}

MemcachedOption struct

func GetMemcachedResource

func GetMemcachedResource(resourceName string) MemcachedOption

GetMemcachedResource function

type RedisConf

type RedisConf struct {
	CacheOptions []RedisOption `json:"redisResources" bson:"redisResources"`
}

RedisConf struct

type RedisOption

type RedisOption struct {
	Name          string `json:"name" bson:"name"`
	Host          string `json:"host" bson:"host"`
	Password      string `json:"password" bson:"password"`
	ExpirationSec int    `json:"expiration" bson:"expiration"`
}

RedisOption struct

func GetRedisResource

func GetRedisResource(resourceName string) RedisOption

GetRedisResource function

Jump to

Keyboard shortcuts

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