Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Storage ¶
Storage implements a Postgresql backed storage layer, suitable for use with the verifiabledatastructures library.
func (*Storage) ExecuteReadOnly ¶
func (pgs *Storage) ExecuteReadOnly(ctx context.Context, namespace []byte, f func(ctx context.Context, db verifiable.KeyReader) error) error
ExecuteReadOnly executes a read only query. Note this will have the side-effect of creating a table for this namespace, if it doesn't already exist.
func (*Storage) ExecuteUpdate ¶
func (pgs *Storage) ExecuteUpdate(ctx context.Context, namespace []byte, f func(ctx context.Context, db verifiable.KeyWriter) error) error
ExecuteUpdate executes an update query. Only one of these can execute per-namespace at once, and this is enforced by a full table lock.
Click to show internal directories.
Click to hide internal directories.