tsdb

package module
v0.0.0-...-a9da99c Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2015 License: MIT Imports: 13 Imported by: 0

README

tsdb

the gschat time sequence database for im storage

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrOp = errors.New("unsupport operation")
)

Errors

Functions

This section is empty.

Types

type DataSet

type DataSet interface {
	MiniVersion() uint64
	Next() (data []byte, version uint64)
	Close()
}

DataSet .

type DataSource

type DataSource interface {
	// Update update key's value or create new one
	Update(key string, data []byte) error
	// Query get key's version values
	Query(key string, version uint64) (DataSet, error)
	// Close close data source
	Close()
}

DataSource .

func Open

func Open(filepath string) (DataSource, error)

Open create new tsdb with root directory

type Persistence

type Persistence interface {
	Close()
	Storage(key string) (Storage, error)
}

Persistence .

type SEQIDGen

type SEQIDGen interface {
	Close()
	SQID(key string) (uint64, error)
}

SEQIDGen .

type Storage

type Storage interface {
	Close()
	Write(val *DBValue) error
	Read(version uint64) (*DBValue, bool)
}

Storage .

Jump to

Keyboard shortcuts

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