MCPcopy
hub / github.com/etcd-io/bbolt / executeOperation

Function executeOperation

concurrent_test.go:424–435  ·  view source on GitHub ↗
(op OperationType, tx *bolt.Tx, bucket []byte, key []byte, conf concurrentConfig)

Source from the content-addressed store, hash-verified

422}
423
424func executeOperation(op OperationType, tx *bolt.Tx, bucket []byte, key []byte, conf concurrentConfig) (historyRecord, error) {
425 switch op {
426 case Read:
427 return executeRead(tx, bucket, key, conf.readInterval)
428 case Write:
429 return executeWrite(tx, bucket, key, conf.writeBytes, conf.noopWriteRatio)
430 case Delete:
431 return executeDelete(tx, bucket, key)
432 default:
433 panic(fmt.Sprintf("unexpected operation type: %s", op))
434 }
435}
436
437func executeRead(tx *bolt.Tx, bucket []byte, key []byte, readInterval duration) (historyRecord, error) {
438 var rec historyRecord

Callers 1

runMethod · 0.85

Calls 3

executeReadFunction · 0.85
executeWriteFunction · 0.85
executeDeleteFunction · 0.85

Tested by

no test coverage detected