shared

package
v0.0.0-...-7664a91 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Database

type Database struct {
	DB          *sql.DB
	Writer      sqlutil.Writer
	TopicsTable tables.NaffkaTopics
	// contains filtered or unexported fields
}

Database represents a database implementation, either Postgres or SQLite.

func (*Database) CreateCache

func (p *Database) CreateCache()

func (*Database) FetchMessages

func (p *Database) FetchMessages(topic string, startOffset, endOffset int64) (messages []types.Message, err error)

FetchMessages implements Database.

func (*Database) MaxOffsets

func (p *Database) MaxOffsets() (map[string]int64, error)

MaxOffsets implements Database.

func (*Database) StoreMessages

func (p *Database) StoreMessages(topic string, messages []types.Message) error

StoreMessages implements Database.

Jump to

Keyboard shortcuts

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