depot

package
v0.0.0-...-1b5f0b1 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2017 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cassandra

type Cassandra struct {
	Session *gocql.Session
	// contains filtered or unexported fields
}

func NewCassandra

func NewCassandra(
	s *Settings,
	readConsistency []gocql.Consistency,
	writeConsistency []gocql.Consistency,
	wal *wal.WAL,
	log *zap.Logger,
	sts *tsstats.StatsTS,
) (*Cassandra, error)

func (*Cassandra) Close

func (cass *Cassandra) Close()

func (*Cassandra) GetText

func (cass *Cassandra) GetText(ksid, tsid string, start, end int64, search *regexp.Regexp) ([]TextPnt, int, gobol.Error)

func (*Cassandra) InsertError

func (cass *Cassandra) InsertError(id, msg, errMsg string, date time.Time) gobol.Error

func (*Cassandra) InsertText

func (cass *Cassandra) InsertText(ksid, tsid string, timestamp int64, text string) gobol.Error

func (*Cassandra) Read

func (cass *Cassandra) Read(ksid, tsid string, blkid int64) ([]byte, gobol.Error)

func (*Cassandra) SetReadConsistencies

func (cass *Cassandra) SetReadConsistencies(consistencies []gocql.Consistency)

func (*Cassandra) SetWriteConsistencies

func (cass *Cassandra) SetWriteConsistencies(consistencies []gocql.Consistency)

func (*Cassandra) Write

func (cass *Cassandra) Write(ksid, tsid string, blkid int64, points []byte) gobol.Error

type Persistence

type Persistence interface {
	Read(ksid, tsid string, blkid int64) ([]byte, gobol.Error)
	Write(ksid, tsid string, blkid int64, points []byte) gobol.Error
}

Persistence interface abstracts where we save data

type Settings

type Settings struct {
	Cassandra     cassandra.Settings
	MaxConcurrent int
}

type TextPnt

type TextPnt struct {
	Date  int64  `json:"x"`
	Value string `json:"title"`
}

type TextPnts

type TextPnts []TextPnt

func (TextPnts) Len

func (s TextPnts) Len() int

func (TextPnts) Less

func (s TextPnts) Less(i, j int) bool

func (TextPnts) Swap

func (s TextPnts) Swap(i, j int)

Jump to

Keyboard shortcuts

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