Documentation ¶
Index ¶
- Constants
- func AofExists() (bool, error)
- func BootAOF(cache *cache.Cache, maxAOFSize int64)
- func BuildCacheFromAof(cache *cache.Cache, logPath string)
- func BuildCacheFromSnapshot(bs *[]byte) (lru.LRUCache, error)
- func CreateAOF(logPath string)
- func CreateSnapshot(cache *cache.Cache, config *config.Configuration) (bool, error)
- func DecryptData(data []byte, passphrase string) ([]byte, error)
- func EncryptData(data []byte, passphrase string) ([]byte, error)
- func FlushBuffer()
- func GetAOFSize() int64
- func GetBufferBytes() []byte
- func GetBufferString() string
- func GetSnapshotFilename() string
- func ReadSnapshot(encryption bool, passphrase ...string) *[]byte
- func RebootAof(cache *cache.Cache, maxAofSize int64)
- func StartSnapshotter(cache *cache.Cache, conf *config.Configuration, scheduler *SnapshotScheduler)
- func StopSnapshotter(scheduler *SnapshotScheduler)
- func WriteBuffer(verb string, key string, value interface{}, ttl int64)
- type SnapshotScheduler
Constants ¶
const (
SNAPSHOT_FILENAME = "snapshot.gz"
)
Variables ¶
This section is empty.
Functions ¶
func BuildCacheFromAof ¶
BuildCache parses a pre-existing AOF rebuilds cache using contents
func BuildCacheFromSnapshot ¶
BuildCache rebuilds the cache from the byte stream of the snapshot
func CreateSnapshot ¶
func DecryptData ¶
DecryptData decrypts snapshots which have at-rest encryption enabled.
func EncryptData ¶
EncryptData is our encryption client to encrypt the serialized cache object with 128 bit AES
func FlushBuffer ¶
func FlushBuffer()
func GetAOFSize ¶
func GetAOFSize() int64
func GetBufferString ¶
func GetBufferString() string
func GetSnapshotFilename ¶
func GetSnapshotFilename() string
GetSnapshotFilename builds the filename for the snapshot being taken
func ReadSnapshot ¶
ReadSnapshot reads the compressed snapshot file into buffer and returns a reference to the buffer
func StartSnapshotter ¶
func StartSnapshotter(cache *cache.Cache, conf *config.Configuration, scheduler *SnapshotScheduler)
* * StartSnapshotter will start the cache snapshot scheduler * * Snapshots are periodically taken of the stores cache until the ticker * is stopped. * StartSnapshotter is generic in nature and will runthe appropriate * snapshotter for the stores underlying cache policy implementation *
func StopSnapshotter ¶
func StopSnapshotter(scheduler *SnapshotScheduler)
StopSnapshotter stops the Snapshotter by passing a bool to the scheduler channel
func WriteBuffer ¶
WriteBuffer writes cache command in log format
Types ¶
type SnapshotScheduler ¶
SnapshotScheduler represents a scheduler for the cache snapshotter
func NewSnapshotScheduler ¶
func NewSnapshotScheduler(interval int32) *SnapshotScheduler
NewSnapshotScheduler initializes a new Snapshot Scheduler