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.
Click to show internal directories.
Click to hide internal directories.