Documentation ¶
Index ¶
- Constants
- func RowsToEvents(rows *sql.Rows) ([]*server.Event, error)
- type Dialect
- type SQLLog
- func (s *SQLLog) After(ctx context.Context, prefix string, revision, limit int64) (int64, []*server.Event, error)
- func (s *SQLLog) Append(ctx context.Context, event *server.Event) (int64, error)
- func (s *SQLLog) Count(ctx context.Context, prefix, startKey string, revision int64) (int64, int64, error)
- func (s *SQLLog) CurrentRevision(ctx context.Context) (int64, error)
- func (s *SQLLog) DbSize(ctx context.Context) (int64, error)
- func (s *SQLLog) DoCompact(ctx context.Context) error
- func (s *SQLLog) List(ctx context.Context, prefix, startKey string, limit, revision int64, ...) (int64, []*server.Event, error)
- func (s *SQLLog) Start(ctx context.Context) (err error)
- func (s *SQLLog) Wait()
- func (s *SQLLog) Watch(ctx context.Context, prefix string) <-chan []*server.Event
Constants ¶
View Source
const SupersededCount = 100
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Dialect ¶
type Dialect interface { ListCurrent(ctx context.Context, prefix, startKey string, limit int64, includeDeleted bool) (*sql.Rows, error) List(ctx context.Context, prefix, startKey string, limit, revision int64, includeDeleted bool) (*sql.Rows, error) CountCurrent(ctx context.Context, prefix, startKey string) (int64, int64, error) Count(ctx context.Context, prefix, startKey string, revision int64) (int64, int64, error) CurrentRevision(ctx context.Context) (int64, error) AfterPrefix(ctx context.Context, prefix string, rev, limit int64) (*sql.Rows, error) After(ctx context.Context, rev, limit int64) (*sql.Rows, error) Insert(ctx context.Context, key string, create, delete bool, createRevision, previousRevision int64, ttl int64, value, prevValue []byte) (int64, error) GetRevision(ctx context.Context, revision int64) (*sql.Rows, error) DeleteRevision(ctx context.Context, revision int64) error GetCompactRevision(ctx context.Context) (int64, int64, error) SetCompactRevision(ctx context.Context, revision int64) error Fill(ctx context.Context, revision int64) error IsFill(key string) bool GetSize(ctx context.Context) (int64, error) GetCompactInterval() time.Duration GetPollInterval() time.Duration Close() }
type SQLLog ¶
type SQLLog struct {
// contains filtered or unexported fields
}
func (*SQLLog) CurrentRevision ¶
func (*SQLLog) DoCompact ¶
DoCompact makes a single compaction run when called. It is intended to be called from test functions that have access to the backend.
Click to show internal directories.
Click to hide internal directories.