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