kvstore

package
v0.0.0-...-0b5b0ed Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2015 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KeyValueIterator

type KeyValueIterator interface {
	Next() bool
	Current() string
	Close()
}

type KeyValueStore

type KeyValueStore interface {
	Get(table string, k string) (string, error)
	Add(tx Tx, table string, k string, v string) error
	Close()
	GetAllKeys(table string) KeyValueIterator
	Len(table string) int64
	LogSimilar(url string, canonical string) error
	StartTx() Tx
}

type MysqlIterator

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

func (*MysqlIterator) Close

func (iter *MysqlIterator) Close()

func (*MysqlIterator) Current

func (iter *MysqlIterator) Current() string

func (*MysqlIterator) Next

func (iter *MysqlIterator) Next() bool

type MysqlStore

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

func MysqlStoreOpen

func MysqlStoreOpen(tables ...string) *MysqlStore

func (*MysqlStore) Add

func (ms *MysqlStore) Add(tx Tx, table string, k string, v string) error

func (*MysqlStore) Close

func (ms *MysqlStore) Close()

func (*MysqlStore) Get

func (ms *MysqlStore) Get(table string, k string) (string, error)

func (*MysqlStore) GetAllKeys

func (ms *MysqlStore) GetAllKeys(table string) KeyValueIterator

func (*MysqlStore) Len

func (ms *MysqlStore) Len(table string) int64

func (*MysqlStore) LogSimilar

func (ms *MysqlStore) LogSimilar(url string, canonical string) error

func (*MysqlStore) StartTx

func (ms *MysqlStore) StartTx() Tx

type MysqlTx

type MysqlTx struct {
	*sql.Tx
	// contains filtered or unexported fields
}

func (*MysqlTx) End

func (tx *MysqlTx) End()

type NullIterator

type NullIterator struct {
}

func (*NullIterator) Close

func (iter *NullIterator) Close()

func (*NullIterator) Current

func (iter *NullIterator) Current() string

func (*NullIterator) Next

func (iter *NullIterator) Next() bool

type NullStore

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

func NewNullStore

func NewNullStore() *NullStore

func (*NullStore) Add

func (ns *NullStore) Add(tx Tx, table string, k string, v string) error

func (*NullStore) Close

func (ns *NullStore) Close()

func (*NullStore) Get

func (ns *NullStore) Get(table string, k string) (string, error)

func (*NullStore) GetAllKeys

func (ns *NullStore) GetAllKeys(table string) KeyValueIterator

func (*NullStore) Len

func (ns *NullStore) Len(table string) int64

func (*NullStore) LogSimilar

func (ns *NullStore) LogSimilar(url string, canonical string) error

func (*NullStore) StartTx

func (ns *NullStore) StartTx() Tx

type NullTx

type NullTx struct{}

func (*NullTx) End

func (tx *NullTx) End()

type Tx

type Tx interface {
	End()
}

Jump to

Keyboard shortcuts

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