MCPcopy Create free account
hub / github.com/cairoeth/preconfirmations / NewRedisQueue

Function NewRedisQueue

preconf-share/simqueue/queue.go:147–157  ·  view source on GitHub ↗
(log *zap.Logger, red *redis.Client, queueName string)

Source from the content-addressed store, hash-verified

145}
146
147func NewRedisQueue(log *zap.Logger, red *redis.Client, queueName string) *RedisQueue {
148 currentBlock := uint64(0)
149 log = log.With(zap.String("queue", queueName))
150 return &RedisQueue{
151 log: log,
152 red: red,
153 currentBlock: &currentBlock,
154 queueName: queueName,
155 Config: DefaultQueueConfig,
156 }
157}
158
159func (s *RedisQueue) UpdateBlock(block uint64) error {
160 current := atomic.LoadUint64(s.currentBlock)

Callers 3

mainFunction · 0.92
newQueueRunnerFunction · 0.85
BenchmarkQueueFunction · 0.85

Calls 1

StringMethod · 0.80

Tested by 2

newQueueRunnerFunction · 0.68
BenchmarkQueueFunction · 0.68