MCPcopy
hub / github.com/etcd-io/etcd / If

Method If

client/v3/txn.go:40–40  ·  view source on GitHub ↗

If takes a list of comparison. If all comparisons passed in succeed, the operations passed into Then() will be executed. Or the operations passed into Else() will be executed.

(cs ...Cmp)

Source from the content-addressed store, hash-verified

38 // the operations passed into Then() will be executed. Or the operations
39 // passed into Else() will be executed.
40 If(cs ...Cmp) Txn
41
42 // Then takes a list of operations. The Ops list will be executed, if the
43 // comparisons passed in If() succeed.

Callers 15

ExampleAuthFunction · 0.65
TestTxnPanicsFunction · 0.65
ExampleKV_txnFunction · 0.65
IfMethod · 0.65
serverTxnMethod · 0.65
DoMethod · 0.65
rescindMethod · 0.65
tryModifyOpMethod · 0.65
acquireMethod · 0.65
deleteRangeRPCMethod · 0.65
revokeMethod · 0.65
IfMethod · 0.65

Implementers 5

txnclient/v3/txn.go
txnLeasingclient/v3/leasing/txn.go
txnOrderingclient/v3/ordering/kv.go
txnPrefixclient/v3/namespace/kv.go
wrappedTxntests/robustness/client/client.go

Calls

no outgoing calls

Tested by 15

ExampleAuthFunction · 0.52
TestTxnPanicsFunction · 0.52
ExampleKV_txnFunction · 0.52
ExampleKeyMissingFunction · 0.52
ExampleKeyExistsFunction · 0.52
TestTxnCompareRangeFunction · 0.52
TestTxnNestedFunction · 0.52
TestLeasingTxnOwnerGetFunction · 0.52