sqlite

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: May 13, 2023 License: BSD-2-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	Path string `yaml:"path"`
}

Options for connecting to SQLite db

type Results

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

Results represents a DB connection to sqlite

func New

func New(opts Options) (*Results, error)

New opens a SQLite DB file (or in-mem). We also attempt to create / update tables to make it ready for use.

func (*Results) Close

func (s *Results) Close() error

func (*Results) Get

func (s *Results) Get(ctx context.Context, uuid string) ([]byte, error)

Get returns the result of a job. Part of tasqueue.Results interface

func (*Results) Query

func (s *Results) Query(ctx context.Context, token string, filters ...*tq.Filter) ([]*tq.QueryResult, string, error)

func (*Results) Set

func (s *Results) Set(ctx context.Context, uuid, status string, meta *tq.Correlation, b []byte) error

Set sets the result of a job. Part of tasqueue.Results interface

Jump to

Keyboard shortcuts

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