cachers

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CacheProcessor

type CacheProcessor interface {
	CheckAndSave(uuid.UUID, types.LoaderObjectType, []byte) error
}

CacheProcessor for processing objects and save into cache

type FileCache

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

FileCache object provides caching objects from controller into directory

func NewFileCache

func NewFileCache(dirGetters types.DirGetters) *FileCache

NewFileCache creates new FileCache with provided directories

func (*FileCache) CheckAndSave

func (cacher *FileCache) CheckAndSave(devUUID uuid.UUID, typeToProcess types.LoaderObjectType, data []byte) error

CheckAndSave process LoaderObjectType from data

type RedisCache

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

RedisCache object provides caching objects from controller into redis

func NewRedisCache

func NewRedisCache(addr string, password string, databaseID int, streamGetters types.StreamGetters) *RedisCache

NewRedisCache creates new RedisCache with provided settings

func (*RedisCache) CheckAndSave

func (cacher *RedisCache) CheckAndSave(devUUID uuid.UUID, typeToProcess types.LoaderObjectType, data []byte) (err error)

CheckAndSave process LoaderObjectType from data

Jump to

Keyboard shortcuts

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