swarm: integrate OpenTracing; propagate ctx to internal APIs (#17169)
* swarm: propagate ctx, enable opentracing * swarm/tracing: log error when tracing is misconfigured
This commit is contained in:
committed by
Balint Gabor
parent
f7d3678c28
commit
7c9314f231
@@ -19,6 +19,7 @@
|
||||
package storage
|
||||
|
||||
import (
|
||||
"context"
|
||||
"sync"
|
||||
|
||||
lru "github.com/hashicorp/golang-lru"
|
||||
@@ -68,7 +69,7 @@ func NewMemStore(params *StoreParams, _ *LDBStore) (m *MemStore) {
|
||||
}
|
||||
}
|
||||
|
||||
func (m *MemStore) Get(addr Address) (*Chunk, error) {
|
||||
func (m *MemStore) Get(ctx context.Context, addr Address) (*Chunk, error) {
|
||||
if m.disabled {
|
||||
return nil, ErrChunkNotFound
|
||||
}
|
||||
@@ -90,7 +91,7 @@ func (m *MemStore) Get(addr Address) (*Chunk, error) {
|
||||
return c.(*Chunk), nil
|
||||
}
|
||||
|
||||
func (m *MemStore) Put(c *Chunk) {
|
||||
func (m *MemStore) Put(ctx context.Context, c *Chunk) {
|
||||
if m.disabled {
|
||||
return
|
||||
}
|
||||
|
Reference in New Issue
Block a user