Documentation ¶
Index ¶
- func BatchIDForChunk(st storage.Store, addr swarm.Address) ([]byte, error)
- func CleanupDirty(batch internal.BatchOperation) error
- func DeleteTag(st storage.Store, tagID uint64) error
- func Iterate(ctx context.Context, s internal.Storage, ...) error
- func IterateAll(st storage.Store, ...) error
- func NewPushReporter(s internal.Storage) storage.PushReporter
- func NewPutter(s internal.Storage, tagID uint64) (internal.PutterCloserWithReference, error)
- type TagItem
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BatchIDForChunk ¶
BatchIDForChunk returns the first known batchID for the given chunk address.
func CleanupDirty ¶
func CleanupDirty(batch internal.BatchOperation) error
CleanupDirty does a best-effort cleanup of dirty tags. This is called on startup.
func IterateAll ¶
func NewPushReporter ¶
func NewPushReporter(s internal.Storage) storage.PushReporter
NewPushReporter returns a new storage.PushReporter which can be used by the pusher component to report chunk state information.
Types ¶
type TagItem ¶
type TagItem struct { TagID uint64 // unique identifier for the tag Split uint64 // total no of chunks processed by the splitter for hashing Seen uint64 // total no of chunks already seen Stored uint64 // total no of chunks stored locally on the node Sent uint64 // total no of chunks sent to the neighbourhood Synced uint64 // total no of chunks synced with proof Address swarm.Address // swarm.Address associated with this tag StartedAt int64 // start timestamp }
TagItem is an store.Item that stores information about a session of upload.
func ListAllTags ¶
ListAllTags returns all the TagItems in the store.
func NextTag ¶
NextTag returns the next tag ID to be used. It reads the last used ID and increments it by 1. This method needs to be called under lock by user as there is no guarantee for parallel updates.
Click to show internal directories.
Click to hide internal directories.