Documentation
¶
Overview ¶
package pin implemnts structures and methods to keep track of which objects a user wants to keep stored locally.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewIndirectPin ¶
func NewIndirectPin(dstore ds.Datastore) *indirectPin
Types ¶
type ManualPinner ¶
type ManualPinner interface {
PinWithMode(key.Key, PinMode)
RemovePinWithMode(key.Key, PinMode)
Pinner
}
ManualPinner is for manually editing the pin structure Use with care! If used improperly, garbage collection may not be successful
type Pinner ¶
type Pinner interface {
IsPinned(key.Key) bool
Pin(context.Context, *mdag.Node, bool) error
Unpin(context.Context, key.Key, bool) error
Flush() error
GetManual() ManualPinner
DirectKeys() []key.Key
IndirectKeys() map[key.Key]int
RecursiveKeys() []key.Key
}
func LoadPinner ¶
func LoadPinner(d ds.ThreadSafeDatastore, dserv mdag.DAGService) (Pinner, error)
LoadPinner loads a pinner and its keysets from the given datastore
Click to show internal directories.
Click to hide internal directories.