Documentation ¶
Index ¶
- Variables
- func CleanupDirty(st transaction.Storage) error
- func DeletePin(ctx context.Context, st transaction.Storage, root swarm.Address) error
- func HasPin(st storage.Reader, root swarm.Address) (bool, error)
- func IterateCollection(st storage.Reader, root swarm.Address, ...) error
- func IterateCollectionStats(st storage.Reader, iterateFn func(st CollectionStat) (bool, error)) error
- func NewCollection(st storage.IndexStore) (internal.PutterCloserWithReference, error)
- func Pins(st storage.Reader) ([]swarm.Address, error)
- type CollectionStat
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrDuplicatePinCollection is returned when attempted to pin the same file repeatedly ErrDuplicatePinCollection = errors.New("pin store: duplicate pin collection") )
Functions ¶
func CleanupDirty ¶
func CleanupDirty(st transaction.Storage) error
CleanupDirty will iterate over all the dirty collections and delete them.
func DeletePin ¶
DeletePin will delete the root pin and all the chunks that are part of this collection.
func IterateCollection ¶
func IterateCollectionStats ¶
func NewCollection ¶
func NewCollection(st storage.IndexStore) (internal.PutterCloserWithReference, error)
NewCollection returns a putter wrapped around the passed storage. The putter will add the chunk to Chunk store if it doesn't exists within this collection. It will create a new UUID for the collection which can be used to iterate on all the chunks that are part of this collection. The root pin is only updated on successful close of this. Calls to the Putter MUST be mutex locked to prevent concurrent upload data races.
Types ¶
type CollectionStat ¶
CollectionStat is used to store some basic stats about the pinning collection
Click to show internal directories.
Click to hide internal directories.