Documentation ¶
Overview ¶
Package feeds implements generic interfaces and methods for time-based feeds indexing schemes are implemented in subpackages - epochs - sequence
Index ¶
- Variables
- func FromChunk(ch swarm.Chunk) (uint64, []byte, error)
- func Id(topic []byte, index Index) ([]byte, error)
- func Latest(ctx context.Context, l Lookup, after int64) (swarm.Chunk, error)
- func NewUpdate(f *Feed, idx Index, timestamp int64, payload, sig []byte) (swarm.Chunk, error)
- func UpdatedAt(ch swarm.Chunk) (uint64, error)
- type Factory
- type Feed
- type Getter
- type Index
- type Lookup
- type Putter
- type Type
- type Update
- type Updater
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrFeedTypeNotFound = errors.New("no such feed type")
Functions ¶
func Latest ¶
Latest looks up the latest update of the feed after is a unix time hint of the latest known update
Types ¶
type Feed ¶
Feed is representing an epoch based feed
type Getter ¶
type Getter struct { *Feed // contains filtered or unexported fields }
Getter encapsulates a chunk Getter getter and a feed and provides non-concurrent lookup methods
type Lookup ¶
type Lookup interface {
At(ctx context.Context, at, after int64) (chunk swarm.Chunk, currentIndex, nextIndex Index, err error)
}
Lookup is the interface for time based feed lookup
type Putter ¶
type Putter struct { *Feed // contains filtered or unexported fields }
Putter encapsulates a chunk store putter and a Feed to store feed updates
type Type ¶
type Type int
Type enumerates the time-based feed types
func (*Type) FromString ¶
FromString constructs the type from a string
Directories ¶
Path | Synopsis |
---|---|
Package epochs implements time-based feeds using epochs as index and provide sequential as well as concurrent lookup algorithms
|
Package epochs implements time-based feeds using epochs as index and provide sequential as well as concurrent lookup algorithms |
Package sequence provides implementation of sequential indexing for time-based feeds this feed type is best suited for - version updates - followed updates - frequent or regular-interval updates
|
Package sequence provides implementation of sequential indexing for time-based feeds this feed type is best suited for - version updates - followed updates - frequent or regular-interval updates |
package testing provides tests for update and resolution of time-based feeds
|
package testing provides tests for update and resolution of time-based feeds |
Click to show internal directories.
Click to hide internal directories.