storage

package
v0.0.0-...-98c0197 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BinlogInformation

type BinlogInformation struct {
	File     string
	Position uint32
}

BinlogInformation Represents the information about the MySQL binlog.

type BoltDBStore

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

BoltDBStore Represents an instance of the BoltDB storage.

func (*BoltDBStore) Close

func (store *BoltDBStore) Close()

Close Closes the BoltDB storage.

func (*BoltDBStore) Commit

func (store *BoltDBStore) Commit() error

Commit Commits the current transaction.

func (*BoltDBStore) Get

func (store *BoltDBStore) Get(key []byte) ([]byte, error)

Get Gets the value associated with the specified key.

func (*BoltDBStore) GetBinlogPosition

func (store *BoltDBStore) GetBinlogPosition() (*BinlogInformation, error)

GetBinlogPosition Returns the persisted binlog position.

func (*BoltDBStore) GetFromBucket

func (store *BoltDBStore) GetFromBucket(bucket []byte, key []byte) ([]byte, error)

GetFromBucket Gets the value associated with the specified key from the specified bucket.

func (*BoltDBStore) IsStarted

func (store *BoltDBStore) IsStarted() bool

IsStarted Returns whether the BoltDB store is started.

func (*BoltDBStore) Open

func (store *BoltDBStore) Open(filename string) error

Open Opens the disk storage.

func (*BoltDBStore) Set

func (store *BoltDBStore) Set(key []byte, value []byte) error

Set Sets the specified value associated with the specified key.

func (*BoltDBStore) SetBinlogPosition

func (store *BoltDBStore) SetBinlogPosition(binlogInfo *BinlogInformation) error

SetBinlogPosition Sets and persists the current binlog position.

func (*BoltDBStore) SetFromBucket

func (store *BoltDBStore) SetFromBucket(bucket []byte, key []byte, value []byte) error

SetFromBucket Sets the specified value associated with the specified key in the specified bucket.

type LMDBStore

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

LMDBStore Represents an instance of the LMDB storage engine.

func (*LMDBStore) Commit

func (store *LMDBStore) Commit() error

Commit Commits the current write batch.

func (*LMDBStore) Get

func (store *LMDBStore) Get(key []byte) ([]byte, error)

Get Gets the value associated with the specified key.

func (*LMDBStore) GetBinlogPosition

func (store *LMDBStore) GetBinlogPosition() (*BinlogInformation, error)

GetBinlogPosition Returns the persisted binlog position.

func (*LMDBStore) IsStarted

func (store *LMDBStore) IsStarted() bool

IsStarted Returns whether the LMDB store is started.

func (*LMDBStore) Open

func (store *LMDBStore) Open(filename string) error

Open Opens the disk storage.

func (*LMDBStore) Set

func (store *LMDBStore) Set(key []byte, value []byte) error

Set Sets the specified value associated with the specified key.

func (*LMDBStore) SetBinlogPosition

func (store *LMDBStore) SetBinlogPosition(binlogInfo *BinlogInformation) error

SetBinlogPosition Sets and persists the current binlog position.

type MapStore

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

MapStore Represents an instance of the in-memory storage.

func (*MapStore) Close

func (store *MapStore) Close()

Close Closes the storage.

func (*MapStore) Commit

func (store *MapStore) Commit() error

Commit Commits the current transaction.

func (*MapStore) Get

func (store *MapStore) Get(key []byte) ([]byte, error)

Get Gets the value associated with the specified key.

func (*MapStore) GetBinlogPosition

func (store *MapStore) GetBinlogPosition() (*BinlogInformation, error)

GetBinlogPosition Returns the persisted binlog position.

func (*MapStore) IsStarted

func (store *MapStore) IsStarted() bool

IsStarted Returns whether the store is started.

func (*MapStore) Open

func (store *MapStore) Open(filename string) error

Open Opens the storage.

func (*MapStore) Set

func (store *MapStore) Set(key []byte, value []byte) error

Set Sets the specified value associated with the specified key.

func (*MapStore) SetBinlogPosition

func (store *MapStore) SetBinlogPosition(binlogInfo *BinlogInformation) error

SetBinlogPosition Sets and persists the current binlog position.

type NoopStore

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

NoopStore Represents a store instance that does nothing.

func (*NoopStore) Close

func (store *NoopStore) Close()

Close Closes the storage.

func (*NoopStore) Commit

func (store *NoopStore) Commit() error

Commit Commits the current transaction.

func (*NoopStore) Get

func (store *NoopStore) Get(key []byte) ([]byte, error)

Get Gets the value associated with the specified key.

func (*NoopStore) GetBinlogPosition

func (store *NoopStore) GetBinlogPosition() (*BinlogInformation, error)

GetBinlogPosition Returns the persisted binlog position.

func (*NoopStore) IsStarted

func (store *NoopStore) IsStarted() bool

IsStarted Returns whether the store is started.

func (*NoopStore) Open

func (store *NoopStore) Open(filename string) error

Open Opens the storage.

func (*NoopStore) Set

func (store *NoopStore) Set(key []byte, value []byte) error

Set Sets the specified value associated with the specified key.

func (*NoopStore) SetBinlogPosition

func (store *NoopStore) SetBinlogPosition(binlogInfo *BinlogInformation) error

SetBinlogPosition Sets and persists the current binlog position.

type Store

type Store interface {
	IsStarted() bool
	Open(filename string) error
	GetBinlogPosition() (*BinlogInformation, error)
	SetBinlogPosition(binlogInfo *BinlogInformation) error
	Get(key []byte) ([]byte, error)
	Set(key []byte, value []byte) error
	Commit() error
}

Store Represents the storage API's.

Jump to

Keyboard shortcuts

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