Documentation ¶
Index ¶
- Constants
- Variables
- type DataSource
- type Item
- type ItemMeta
- type ItemType
- type Items
- type JsonRPCDatasource
- func (j *JsonRPCDatasource) Get(key []byte) (Item, error)
- func (j *JsonRPCDatasource) Init(dsn string) error
- func (j *JsonRPCDatasource) List(keyPrfix []byte, opts ListOpt) ([]Item, error)
- func (j *JsonRPCDatasource) Put(key []byte, value []byte, meta ItemMeta) error
- func (j *JsonRPCDatasource) Remove(key []byte) error
- func (j *JsonRPCDatasource) Sync() error
- type ListOpt
- type MySQLDatasource
- func (m *MySQLDatasource) Get(key []byte) (Item, error)
- func (m *MySQLDatasource) Init(dsn string) error
- func (m *MySQLDatasource) List(keyPrfix []byte, opts ListOpt) ([]Item, error)
- func (m *MySQLDatasource) Put(key []byte, value []byte, meta ItemMeta) error
- func (m *MySQLDatasource) Remove(key []byte) error
- func (m *MySQLDatasource) Sync() error
Constants ¶
View Source
const (
DefaultNS = "default"
)
Variables ¶
Functions ¶
This section is empty.
Types ¶
type DataSource ¶
type DataSource interface { Get(key []byte) (Item, error) List(keyPrfix []byte, opts ListOpt) ([]Item, error) Put(key, value []byte, meta ItemMeta) error Remove(key []byte) error Init(dsn string) error Sync() error }
func Init ¶
func Init(dsn string) (DataSource, error)
type JsonRPCDatasource ¶
type JsonRPCDatasource struct { }
func (*JsonRPCDatasource) Init ¶
func (j *JsonRPCDatasource) Init(dsn string) error
func (*JsonRPCDatasource) List ¶
func (j *JsonRPCDatasource) List(keyPrfix []byte, opts ListOpt) ([]Item, error)
func (*JsonRPCDatasource) Put ¶
func (j *JsonRPCDatasource) Put(key []byte, value []byte, meta ItemMeta) error
func (*JsonRPCDatasource) Remove ¶
func (j *JsonRPCDatasource) Remove(key []byte) error
func (*JsonRPCDatasource) Sync ¶
func (j *JsonRPCDatasource) Sync() error
type MySQLDatasource ¶
type MySQLDatasource struct {
// contains filtered or unexported fields
}
func (*MySQLDatasource) Init ¶
func (m *MySQLDatasource) Init(dsn string) error
func (*MySQLDatasource) List ¶
func (m *MySQLDatasource) List(keyPrfix []byte, opts ListOpt) ([]Item, error)
func (*MySQLDatasource) Put ¶
func (m *MySQLDatasource) Put(key []byte, value []byte, meta ItemMeta) error
func (*MySQLDatasource) Remove ¶
func (m *MySQLDatasource) Remove(key []byte) error
func (*MySQLDatasource) Sync ¶
func (m *MySQLDatasource) Sync() error
Click to show internal directories.
Click to hide internal directories.