sql

package
v1.46.0 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2025 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SQLiteBufferConfig

func SQLiteBufferConfig() *service.ConfigSpec

SQLiteBufferConfig returns a config spec for an SQLite buffer.

Types

type SQLiteBuffer

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

SQLiteBuffer stores messages for consumption through an SQLite DB.

func NewSQLiteBufferFromConfig

func NewSQLiteBufferFromConfig(conf *service.ParsedConfig, res *service.Resources) (*SQLiteBuffer, error)

NewSQLiteBufferFromConfig creates a new SQLite buffer from a parsed config.

func (*SQLiteBuffer) Close

func (m *SQLiteBuffer) Close(ctx context.Context) error

Close the underlying DB connection.

func (*SQLiteBuffer) EndOfInput

func (m *SQLiteBuffer) EndOfInput()

EndOfInput signals to the buffer that the input is finished and therefore once the DB is drained it should close.

func (*SQLiteBuffer) ReadBatch

ReadBatch attempts to pop a row from the DB.

func (*SQLiteBuffer) WriteBatch

func (m *SQLiteBuffer) WriteBatch(ctx context.Context, msgBatch service.MessageBatch, aFn service.AckFunc) error

WriteBatch adds a new message to the DB.

Jump to

Keyboard shortcuts

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