diff options
author | Anton Evangelatov <anton.evangelatov@gmail.com> | 2018-07-13 23:40:28 +0800 |
---|---|---|
committer | Balint Gabor <balint.g@gmail.com> | 2018-07-13 23:40:28 +0800 |
commit | 7c9314f231a7ddffbbbc5fec16c65519a0121eeb (patch) | |
tree | dbc4021b66ee8968ad747036741fac7e1b972a39 /swarm/storage/memstore.go | |
parent | f7d3678c28c4b92e45a458e4785bd0f1cdc20e34 (diff) | |
download | go-tangerine-7c9314f231a7ddffbbbc5fec16c65519a0121eeb.tar go-tangerine-7c9314f231a7ddffbbbc5fec16c65519a0121eeb.tar.gz go-tangerine-7c9314f231a7ddffbbbc5fec16c65519a0121eeb.tar.bz2 go-tangerine-7c9314f231a7ddffbbbc5fec16c65519a0121eeb.tar.lz go-tangerine-7c9314f231a7ddffbbbc5fec16c65519a0121eeb.tar.xz go-tangerine-7c9314f231a7ddffbbbc5fec16c65519a0121eeb.tar.zst go-tangerine-7c9314f231a7ddffbbbc5fec16c65519a0121eeb.zip |
swarm: integrate OpenTracing; propagate ctx to internal APIs (#17169)
* swarm: propagate ctx, enable opentracing
* swarm/tracing: log error when tracing is misconfigured
Diffstat (limited to 'swarm/storage/memstore.go')
-rw-r--r-- | swarm/storage/memstore.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/swarm/storage/memstore.go b/swarm/storage/memstore.go index 7af31ffbd..55cfcbfea 100644 --- a/swarm/storage/memstore.go +++ b/swarm/storage/memstore.go @@ -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 } |