Version: v0.0.0-...-a55c58d Latest Latest

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

Go to latest
Published: Mar 19, 2017 License: MIT Imports: 5 Imported by: 0




This section is empty.


This section is empty.


This section is empty.


type CollectionNotFoundErr

type CollectionNotFoundErr string

CollectionNotFoundErr is error return if collection name not found

func (CollectionNotFoundErr) Error

func (collectionName CollectionNotFoundErr) Error() string

type PgStore

type PgStore struct {
	// contains filtered or unexported fields

PgStore is state storage into PostgreSQL

func (*PgStore) Add

func (pgStore *PgStore) Add(name string, ts Timestamp) error

Add new collection into PgStore

func (*PgStore) Close

func (pgStore *PgStore) Close() error

Close PgStore

func (*PgStore) Exists

func (pgStore *PgStore) Exists(name string) (bool, error)

Exists check collection

func (*PgStore) GetTimestamp

func (pgStore *PgStore) GetTimestamp(name string) (Timestamp, error)

GetTimestamp return current timestamp

func (*PgStore) UpdateTimestamp

func (pgStore *PgStore) UpdateTimestamp(name string, ts Timestamp) error

UpdateTimestamp update last_timestamp for collection by `name`

type Store

type Store interface {
	Exists(name string) (bool, error)
	Add(name string, timestamp Timestamp) error
	UpdateTimestamp(name string, timestamp Timestamp) error
	GetTimestamp(name string) (Timestamp, error)
	Close() error

Store is interface for state storages

func NewPgStore

func NewPgStore(url string) (Store, error)

NewPgStore create new PgStore

func NewStore

func NewStore(driver string, url string) (Store, error)

NewStore create new store with driver

type Timestamp

type Timestamp struct {
	Ordinal int32

Timestamp is mapping mongo Timestamp for pg

func (Timestamp) After

func (t Timestamp) After(o Timestamp) bool

After return true if curemt Timestamp after other

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL