lib_gc_cache_source

package
v0.0.0-...-e28984d Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ADDRESS string
View Source
var AVAILABLE_CONNECTIONS int = 0
View Source
var IN_USE_CONNECTIONS int = 0
View Source
var MAX_IDLE_CONNECTIONS int
View Source
var NETWORK string
View Source
var PASSWD string
View Source
var PIPELINE_LIMIT int
View Source
var PIPELINE_LIMIT_BY_INTERVAL_OF_TIME int

Functions

This section is empty.

Types

type ICacheSource

type ICacheSource interface {
	InitSource() error
	CloseSource() error
	AddData(key, value *[]byte) error
	AddMData(data *[][]byte) error
	GetData(key *[]byte) (*[]byte, error)
	MGetData(keys *[][]byte) (*[][]byte, error)
	DeleteData(key *[]byte) (bool, error)

	// Hash methdos to manage index keys
	AddToHash(hash *string, key, value *[]byte) error
	GetKeysFromHash(hash *string) (*[][]byte, error)
	RemoveKeyFromHash(hash *string, key *[]byte) error
	RemoveHash(hash *string) error
}
var ICacheMap ICacheSource
var ICacheRedis ICacheSource

type ICacheSourceContainer

type ICacheSourceContainer interface {
	AddICacheSoure(key string, cacheSource ICacheSource) error
	GetICacheSource(key string) (ICacheSource, error)
	RemoveICacheSource(key string) error
}
var CacheSourceContainer ICacheSourceContainer

type MapCache

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

func (*MapCache) AddData

func (mp *MapCache) AddData(key, value *[]byte) error

func (*MapCache) AddMData

func (mp *MapCache) AddMData(data *[][]byte) error

func (*MapCache) AddToHash

func (mp *MapCache) AddToHash(hash *string, key, value *[]byte) error

func (*MapCache) CloseSource

func (mp *MapCache) CloseSource() error

func (*MapCache) DeleteData

func (mp *MapCache) DeleteData(key *[]byte) (bool, error)

func (*MapCache) GetData

func (mp *MapCache) GetData(key *[]byte) (*[]byte, error)

func (*MapCache) GetKeysFromHash

func (mp *MapCache) GetKeysFromHash(hash *string) (*[][]byte, error)

func (*MapCache) InitSource

func (mp *MapCache) InitSource() error

func (*MapCache) MGetData

func (mp *MapCache) MGetData(keys *[][]byte) (*[][]byte, error)

func (*MapCache) RemoveHash

func (mp *MapCache) RemoveHash(hash *string) error

func (*MapCache) RemoveKeyFromHash

func (mp *MapCache) RemoveKeyFromHash(hash *string, key *[]byte) error

type PipelineAppener

type PipelineAppener interface {
	AppendToPipeline() (map[string]int, error)
	GetKeys() *[][]byte
}

type PipelineFlusher

type PipelineFlusher interface {
	AppendToPipeLine(appener PipelineAppener) error
	ManagePipeLineBySize() error
	ManagePipeLineByIntervalOfTime() error
	FlushPipeLine() error
}

PIPELINE FLUSHER

var Pipeline PipelineFlusher

type PipelinedActionAddData

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

PIPELINED ADD DATA

func (*PipelinedActionAddData) AppendToPipeline

func (pAddData *PipelinedActionAddData) AppendToPipeline() (map[string]int, error)

func (*PipelinedActionAddData) GetKeys

func (pAddData *PipelinedActionAddData) GetKeys() *[][]byte

type PipelinedActionAddMData

type PipelinedActionAddMData struct {
	Data *[][]byte
}

PIPELINED MSET

func (*PipelinedActionAddMData) AppendToPipeline

func (pAddMData *PipelinedActionAddMData) AppendToPipeline() (map[string]int, error)

func (*PipelinedActionAddMData) GetKeys

func (pAddMData *PipelinedActionAddMData) GetKeys() *[][]byte

type PipelinedActionAddToHash

type PipelinedActionAddToHash struct {
	Hash  *string
	Key   *[]byte
	Value *[]byte
}

PIPELINED ADD TO HASH

func (*PipelinedActionAddToHash) AppendToPipeline

func (pAddToHash *PipelinedActionAddToHash) AppendToPipeline() (map[string]int, error)

func (*PipelinedActionAddToHash) GetKeys

func (pAddToHash *PipelinedActionAddToHash) GetKeys() *[][]byte

type PipelinedActionRemoveData

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

PIPELINED REMOVE DATA

func (*PipelinedActionRemoveData) AppendToPipeline

func (pRemoveData *PipelinedActionRemoveData) AppendToPipeline() (map[string]int, error)

func (*PipelinedActionRemoveData) GetKeys

func (pRemoveData *PipelinedActionRemoveData) GetKeys() *[][]byte

type PipelinedActionRemoveFromHash

type PipelinedActionRemoveFromHash struct {
	Hash *string
	Key  *[]byte
}

PIPELINED REMOVE FROM HASH

func (*PipelinedActionRemoveFromHash) AppendToPipeline

func (pRemoveFromHash *PipelinedActionRemoveFromHash) AppendToPipeline() (map[string]int, error)

func (*PipelinedActionRemoveFromHash) GetKeys

func (pRemoveFromHash *PipelinedActionRemoveFromHash) GetKeys() *[][]byte

type PipelinedChanges

type PipelinedChanges struct {
	PendingChanges_chan chan PipelineAppener
	PendingChanges      FIFO.Fifo
}

PIPELINE CHANGES POOL

func (*PipelinedChanges) AppendToPipeLine

func (pc *PipelinedChanges) AppendToPipeLine(appener PipelineAppener) error

func (*PipelinedChanges) FlushPipeLine

func (pc *PipelinedChanges) FlushPipeLine() error

func (*PipelinedChanges) ManagePipeLineByIntervalOfTime

func (pc *PipelinedChanges) ManagePipeLineByIntervalOfTime() error

func (*PipelinedChanges) ManagePipeLineBySize

func (pc *PipelinedChanges) ManagePipeLineBySize() error

Jump to

Keyboard shortcuts

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