Documentation ¶
Index ¶
- Variables
- type Driver
- type Event
- type Generic
- func (g *Generic) Close() error
- func (g *Generic) Delete(ctx context.Context, key string, revision int64) ([]*KeyValue, error)
- func (g *Generic) ExecContext(ctx context.Context, query string, args ...interface{}) (sql.Result, error)
- func (g *Generic) Get(ctx context.Context, key string) (*KeyValue, error)
- func (g *Generic) List(ctx context.Context, revision, limit int64, rangeKey, startKey string) ([]*KeyValue, int64, error)
- func (g *Generic) QueryContext(ctx context.Context, query string, args ...interface{}) (*sql.Rows, error)
- func (g *Generic) Start(ctx context.Context, db *sql.DB) error
- func (g *Generic) Update(ctx context.Context, key string, value []byte, revision, ttl int64) (*KeyValue, *KeyValue, error)
- func (g *Generic) Watch(ctx context.Context, key string, revision int64) <-chan Event
- type KeyValue
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Driver ¶
type Driver interface { List(ctx context.Context, revision, limit int64, rangeKey, startKey string) (kvs []*KeyValue, listRevision int64, err error) Delete(ctx context.Context, key string, revision int64) ([]*KeyValue, error) // Update should return ErrNotExist when the key does not exist and ErrRevisionMatch when revision doesn't match Update(ctx context.Context, key string, value []byte, revision, ttl int64) (oldKv *KeyValue, newKv *KeyValue, err error) Watch(ctx context.Context, key string, revision int64) <-chan Event Close() error }
type Generic ¶
type Generic struct { CleanupSQL string GetSQL string ListSQL string ListRevisionSQL string ListResumeSQL string ReplaySQL string InsertSQL string GetRevisionSQL string ToDeleteSQL string DeleteOldSQL string // contains filtered or unexported fields }
func (*Generic) ExecContext ¶
func (*Generic) QueryContext ¶
Click to show internal directories.
Click to hide internal directories.