sqllog

package
v1.14.2 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2025 License: Apache-2.0 Imports: 11 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RowsToEvents

func RowsToEvents(rows *sql.Rows, val, prev bool) (int64, int64, []*server.Event, error)

rowsToEvents converts database rows to KV store events. if val is false, rows must not include the current value if prev is false, rows must additionally not include the previous value

Types

type SQLLog

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

func New

func New(d server.Dialect, compactInterval time.Duration, compactIntervalJitter int, compactTimeout time.Duration, compactMinRetain int64, compactBatchSize int64, pollBatchSize int64) *SQLLog

func (*SQLLog) After

func (s *SQLLog) After(ctx context.Context, prefix string, revision, limit int64) (int64, []*server.Event, error)

func (*SQLLog) Append

func (s *SQLLog) Append(ctx context.Context, event *server.Event) (int64, error)

func (*SQLLog) Compact added in v0.11.9

func (s *SQLLog) Compact(ctx context.Context, targetCompactRev int64) (int64, error)

func (*SQLLog) CompactRevision added in v0.11.0

func (s *SQLLog) CompactRevision(ctx context.Context) (int64, error)

func (*SQLLog) Count

func (s *SQLLog) Count(ctx context.Context, prefix, startKey string, revision int64) (int64, int64, error)

func (*SQLLog) CurrentRevision

func (s *SQLLog) CurrentRevision(ctx context.Context) (int64, error)

func (*SQLLog) DbSize added in v0.8.0

func (s *SQLLog) DbSize(ctx context.Context) (int64, error)

func (*SQLLog) List

func (s *SQLLog) List(ctx context.Context, prefix, startKey string, limit, revision int64, includeDeleted, keysOnly bool) (int64, []*server.Event, error)

func (*SQLLog) Start

func (s *SQLLog) Start(ctx context.Context) error

func (*SQLLog) Watch

func (s *SQLLog) Watch(ctx context.Context, prefix string) <-chan []*server.Event

Jump to

Keyboard shortcuts

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