asset

package
v0.15.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 22, 2023 License: ISC Imports: 11 Imported by: 0

Documentation

Overview

Package asset - Cache for assets

temporary store assets just received until they are: a. verified by having a corresponding issue verified b. confirmed by having a block broadcast containing them c. expired because no longer referenced by any issues

i.e. all isues were expired

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cache

Cache - cache an incoming asset

func DecrementTTL added in v0.11.0

func DecrementTTL(assetId transactionrecord.AssetIdentifier)

DecrementTTL - issue was expired so decrease lock count

func Delete

func Delete(assetId transactionrecord.AssetIdentifier)

Delete - remove an asset from the cache

func Exists

func Exists(assetId transactionrecord.AssetIdentifier, assetHandle storage.Handle) bool

Exists - check if an item confirmed in storage handle

func Finalise

func Finalise() error

Finalise - stop all background handlers

func Get

Get - get packed asset data from cache (nil if not present)

func IncrementTTL added in v0.11.0

func IncrementTTL(assetId transactionrecord.AssetIdentifier)

IncrementTTL - lock ass as used by one issue

func Initialise

func Initialise() error

Initialise - setup the asset cache

func SetVerified

func SetVerified(assetId transactionrecord.AssetIdentifier)

SetVerified - mark a cached asset being verified

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL