MCPcopy Index your code
hub / github.com/CovenantSQL/CovenantSQL / newTracker

Function newTracker

kayak/tracker.go:55–77  ·  view source on GitHub ↗
(r *Runtime, req interface{}, minCount int)

Source from the content-addressed store, hash-verified

53}
54
55func newTracker(r *Runtime, req interface{}, minCount int) (t *rpcTracker) {
56 // copy nodes
57 nodes := append([]proto.NodeID(nil), r.followers...)
58
59 if minCount > len(nodes) {
60 minCount = len(nodes)
61 }
62 if minCount < 0 {
63 minCount = 0
64 }
65
66 t = &rpcTracker{
67 r: r,
68 nodes: nodes,
69 method: r.applyRPCMethod,
70 req: req,
71 minCount: minCount,
72 errors: make(map[proto.NodeID]error, len(nodes)),
73 doneCh: make(chan struct{}),
74 }
75
76 return
77}
78
79func (t *rpcTracker) send() {
80 if !atomic.CompareAndSwapUint32(&t.sent, 0, 1) {

Callers 2

TestTrackerFunction · 0.85
applyRPCMethod · 0.85

Calls

no outgoing calls

Tested by 1

TestTrackerFunction · 0.68