Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Item ¶
type Item struct { // Values. StampTimestamp []byte ChunkAddress swarm.Address ChunkIsImmutable bool // contains filtered or unexported fields }
Item is an store.Item that represents data relevant to stamp.
func Load ¶
Load returns stamp index record related to the given namespace and chunk. The storage.ErrNotFound is returned if no record is found.
func LoadOrStore ¶
func LoadOrStore( s storage.IndexStore, namespace string, chunk swarm.Chunk, ) (item *Item, loaded bool, err error)
LoadOrStore tries to first load a stamp index related record from the store. If the record is not found, it will try to create and save a new record and return it.
Click to show internal directories.
Click to hide internal directories.