Documentation
¶
Overview ¶
Copyright 2019 The trust-net Authors Resource for world state
Copyright 2019 The trust-net Authors World State interface to manage resources for an APP using DLT stack
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewWorldState ¶
func NewWorldState(dbp db.DbProvider, shardId []byte) (*worldState, error)
Types ¶
type Resource ¶
type Resource struct { // key identifier for the resource (typically a UUID) Key []byte // identity of the owner of this resource Owner []byte // opaque serialized value of the resource Value []byte }
A resource in the world state of a shard
func (*Resource) DeSerialize ¶
type State ¶
type State interface { // used to check if a transaction is already seen by the shard, so as to skip duplicates // also, marks the transaction as seen for any future reference Seen(txId []byte) bool Get(key []byte) (*Resource, error) Put(r *Resource) error Delete(key []byte) error Persist() error Reset() error Close() error }
Click to show internal directories.
Click to hide internal directories.