Documentation
¶
Index ¶
- Constants
- func EnsureCursorSchema(ctx context.Context, db execQuerier) error
- func EnsureSchema(ctx context.Context, db execQuerier) error
- func EnsureScopedSchema(ctx context.Context, db execQuerier) error
- func ManifestKey(sourceName string) (string, string, string)
- type CursorRecord
- type CursorStore
- func (s *CursorStore) Get(ctx context.Context, source, entityType, entityID string) (CursorRecord, bool, error)
- func (s *CursorStore) IsStale(ctx context.Context, source, entityType, entityID string, maxAge time.Duration) (bool, error)
- func (s *CursorStore) Set(ctx context.Context, source, entityType, entityID, cursor string) error
- type Record
- type ScopedRecord
- type ScopedStore
- type Store
- func (s *Store) Get(ctx context.Context, sourceName, entityType, entityID string) (Record, bool, error)
- func (s *Store) IsStale(ctx context.Context, sourceName, entityType, entityID string, ...) (bool, error)
- func (s *Store) Set(ctx context.Context, sourceName, entityType, entityID, value string) error
Constants ¶
View Source
const CursorSchema = `` /* 305-byte string literal not displayed */
View Source
const Schema = `` /* 317-byte string literal not displayed */
View Source
const ScopedSchema = `` /* 206-byte string literal not displayed */
Variables ¶
This section is empty.
Functions ¶
func EnsureCursorSchema ¶
func EnsureSchema ¶
func EnsureScopedSchema ¶
Types ¶
type CursorRecord ¶
type CursorStore ¶
type CursorStore struct {
// contains filtered or unexported fields
}
func NewCursor ¶
func NewCursor(db execQuerier) *CursorStore
func NewCursorWithClock ¶
func NewCursorWithClock(db execQuerier, now func() time.Time) *CursorStore
func (*CursorStore) Get ¶
func (s *CursorStore) Get(ctx context.Context, source, entityType, entityID string) (CursorRecord, bool, error)
type ScopedRecord ¶
type ScopedStore ¶
type ScopedStore struct {
// contains filtered or unexported fields
}
func NewScoped ¶
func NewScoped(db execQuerier) *ScopedStore
func NewScopedWithClock ¶
func NewScopedWithClock(db execQuerier, now func() time.Time) *ScopedStore
func (*ScopedStore) Get ¶
func (s *ScopedStore) Get(ctx context.Context, scope string) (ScopedRecord, bool, error)
Click to show internal directories.
Click to hide internal directories.