resource_block_cursor

package
v0.51.2 Latest Latest
Warning

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

Go to latest
Published: May 7, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockCursorResource

type BlockCursorResource struct {
	// contains filtered or unexported fields
}

BlockCursorResource wraps a block.Cursor for resource access.

func NewBlockCursorResource

func NewBlockCursorResource(le *logrus.Entry, b bus.Bus, tx *block.Transaction, cursor *block.Cursor) *BlockCursorResource

NewBlockCursorResource creates a new BlockCursorResource.

func (*BlockCursorResource) ClearAllRefs

ClearAllRefs clears all references.

func (*BlockCursorResource) ClearRef

ClearRef removes the reference handle to the given ref ID.

func (*BlockCursorResource) Detach

Detach clones the cursor position.

func (*BlockCursorResource) DetachRecursive

DetachRecursive clones the cursor position and all referenced positions.

func (*BlockCursorResource) DetachTransaction

DetachTransaction creates a new ephemeral transaction rooted at the cursor.

func (*BlockCursorResource) Fetch

Fetch fetches the raw block data at the current position.

func (*BlockCursorResource) FollowRef

FollowRef follows a reference field and returns a new cursor.

func (*BlockCursorResource) FollowSubBlock

FollowSubBlock follows a sub-block reference and returns a new cursor.

func (*BlockCursorResource) GetAllRefs

GetAllRefs returns cursors to all references.

func (*BlockCursorResource) GetBlock

GetBlock returns the current loaded block at the position.

func (*BlockCursorResource) GetExistingRef

GetExistingRef checks if the reference has been traversed already.

func (*BlockCursorResource) GetMux

func (r *BlockCursorResource) GetMux() srpc.Invoker

GetMux returns the rpc mux.

func (*BlockCursorResource) GetRef

GetRef gets the current block reference.

func (*BlockCursorResource) IsDirty

IsDirty checks if the cursor has uncommitted changes.

func (*BlockCursorResource) IsSubBlock

IsSubBlock indicates if the cursor is at a sub-block position.

func (*BlockCursorResource) MarkDirty

MarkDirty marks the cursor location dirty for re-writing.

func (*BlockCursorResource) Parents

Parents returns new cursors pointing to the parent blocks.

func (*BlockCursorResource) SetAsSubBlock

SetAsSubBlock sets the cursor position as a sub-block of another block.

func (*BlockCursorResource) SetBlock

SetBlock sets the block at the current position.

func (*BlockCursorResource) SetRef

SetRef sets a block reference to the handle at the cursor.

func (*BlockCursorResource) Unmarshal

Unmarshal fetches and unmarshals the data to a block.

Jump to

Keyboard shortcuts

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