sobject_stateproc

package
v0.55.0 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildProcessOpsFunc

func BuildProcessOpsFunc(applyOp ApplyOpFunc) sobject.ProcessOpsFunc

BuildProcessOpsFunc wraps an ApplyOpFunc into a sobject.ProcessOpsFunc. The resulting function processes operations in batch, applying each one sequentially and collecting results.

Types

type ApplyOpFunc

type ApplyOpFunc func(
	ctx context.Context,
	stateData []byte,
	opData []byte,
	sender peer.ID,
) ([]byte, error)

ApplyOpFunc applies a single operation to the current state. stateData is the current marshaled state (nil/empty for uninitialized). opData is the operation payload from the SOOperationInner. sender is the peer ID that submitted the operation. Returns the next marshaled state data. Return an error to reject the operation.

Jump to

Keyboard shortcuts

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