sdk

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2020 License: MIT Imports: 0 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache interface {
	Insert(key KeyInfo, rec Record)
	Lookup(key KeyInfo) (Record, bool)
	Delete(key KeyInfo)
}

type KeyInfo

type KeyInfo struct {
	Expires int64
	Key     string
}

type LogInfo

type LogInfo struct {
	Id   int64
	Time int64
}

type Record

type Record struct {
	Expires int64
	Value   []byte
}

type ReplItem

type ReplItem struct {
	Action int8
	Key    KeyInfo
	Value  Record
}

func NewReplItem

func NewReplItem(action int8, key KeyInfo, value Record) *ReplItem

type ReplLog

type ReplLog struct {
	Info LogInfo
	Data []ReplItem
}

type Replication

type Replication interface {
	Add(item ReplItem)
}

type Scheduler

type Scheduler interface {
	Add(key KeyInfo)
	GetChan() *chan KeyInfo
}

Jump to

Keyboard shortcuts

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