postgres

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: 10 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 {
	Host            string        `yaml:"host"`
	Port            uint16        `yaml:"port"`
	Database        string        `yaml:"database"`
	User            string        `yaml:"user"`
	Password        string        `yaml:"password"`
	TLSConfig       *tls.Config   `yaml:"tls_config"`
	ConnectTimeout  time.Duration `yaml:"connect_timeout"`
	MaxConnIdleTime time.Duration `yaml:"max_conn_idle_time"`
	MaxConns        int32         `yaml:"max_conns"`
	MinConns        int32         `yaml:"min_conns"`
}

type Results

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

func New

func New(opts Options, lo logf.Logger) (*Results, error)

func (*Results) Close

func (r *Results) Close()

func (*Results) Get

func (r *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 (r *Results) Query(ctx context.Context, token string, filters ...*tq.Filter) ([]*tq.QueryResult, string, error)

func (*Results) Set

func (r *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