postgres

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ExpiredDuration = 24 * time.Hour

	ExpiredTaskTimer = 10 * time.Minute
)
View Source
var (
	ErrPingFailed = errors.New("ping returned error")
)

Functions

This section is empty.

Types

type Cache

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

func NewPostgresCache

func NewPostgresCache(ctx context.Context, db *sql.DB, config *Config) (*Cache, error)

func (*Cache) Get

func (p *Cache) Get(ctx context.Context, k string) (*gocondcache.CacheItem, error)

func (*Cache) Set

func (p *Cache) Set(ctx context.Context, k string, v *gocondcache.CacheItem) error

type Config

type Config struct {
	DeleteExpiredItems bool
}

Jump to

Keyboard shortcuts

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