Documentation
¶
Overview ¶
Package feeds implements generic interfaces and methods for feeds. Indexing schemes are implemented in subpackages: - sequence
Index ¶
- Variables
- func FromChunk(ch swarm.Chunk) (swarm.Chunk, error)
- func GetWrappedChunk(ctx context.Context, getter storage.Getter, ch swarm.Chunk, legacyResolve bool) (swarm.Chunk, error)
- func Id(topic []byte, index Index) ([]byte, error)
- func IsV1Payload(ch swarm.Chunk) (bool, error)
- func Latest(ctx context.Context, l Lookup, after uint64) (swarm.Chunk, error)
- func NewUpdate(f *Feed, idx Index, timestamp int64, payload, sig []byte) (swarm.Chunk, error)
- type Factory
- type Feed
- type Getter
- type Index
- type Lookup
- type Putter
- type Type
- type Update
- type Updater
- type WrappedChunkNotFoundError
Constants ¶
This section is empty.
Variables ¶
var ErrFeedTypeNotFound = errors.New("no such feed type")
var ErrNotLegacyPayload = errors.New("feed update is not in the legacy payload structure")
Functions ¶
func GetWrappedChunk ¶ added in v2.3.0
Types ¶
type Feed ¶
Feed is representing a 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 int64, after uint64) (chunk swarm.Chunk, currentIndex, nextIndex Index, err error)
}
Lookup finds the latest update of a feed. after is the index of a known update to start the search from. at is not used by the sequence 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 feed types
func (*Type) FromString ¶
FromString constructs the type from a string
type Update ¶
type Update struct {
*Feed
// contains filtered or unexported fields
}
Update represents an update instance of a feed, i.e., pairing of a Feed with an Index
type WrappedChunkNotFoundError ¶ added in v2.7.0
type WrappedChunkNotFoundError struct {
Ref []byte
}
func (WrappedChunkNotFoundError) Error ¶ added in v2.7.0
func (e WrappedChunkNotFoundError) Error() string
Directories
¶
| Path | Synopsis |
|---|---|
|
Package sequence provides implementation of sequential indexing for 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 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 |