cache

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2023 License: GPL-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

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

func Load

func Load(fileName string, upgrade bool) (Cache, error)

func (*Cache) Unlock

func (cache *Cache) Unlock() error

type CachedFeed

type CachedFeed interface {
	// Checked marks the feed as being a failure or a success on last check.
	Checked(withFailure bool)
	// Failures of this feed up to now.
	Failures() int
	// The Last time, this feed has been checked
	Last() time.Time
	// Filter the given items against the cached items.
	Filter(items []feed.Item, ignoreHash bool, alwaysNew bool) []feed.Item
	// Commit any changes done to the cache state.
	Commit()
	// The Feed, that is cached.
	Feed() *feed.Feed
}

type Impl

type Impl interface {
	Version() Version
	Info() string
	SpecificInfo(any) string
	// contains filtered or unexported methods
}

type State

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

func NewState

func NewState(cfg *config.Config) (*State, error)

func (*State) Fetch

func (state *State) Fetch() int

func (*State) Filter

func (state *State) Filter()

func (*State) Foreach

func (state *State) Foreach(f func(CachedFeed))

func (*State) ForeachGo

func (state *State) ForeachGo(goFunc func(CachedFeed))

func (*State) LoadCache

func (state *State) LoadCache(fileName string, forceNew bool) error

func (*State) NumFeeds

func (state *State) NumFeeds() int

func (*State) RemoveUndue

func (state *State) RemoveUndue()

func (*State) StoreCache

func (state *State) StoreCache(fileName string) error

func (*State) UnlockCache

func (state *State) UnlockCache()

type Version

type Version byte

Jump to

Keyboard shortcuts

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