MCPcopy
hub / github.com/grafana/tempo / Set

Method Set

pkg/cache/memcached_client.go:229–249  ·  view source on GitHub ↗
(item *memcache.Item)

Source from the content-addressed store, hash-verified

227}
228
229func (c *memcachedClient) Set(item *memcache.Item) error {
230 // Skip hitting memcached at all if the item is bigger than the max allowed size.
231 if c.maxItemSize > 0 && len(item.Value) > c.maxItemSize {
232 c.skipped.Inc()
233 return nil
234 }
235
236 err := c.Client.Set(item)
237 if err == nil {
238 return nil
239 }
240
241 // Inject the server address in order to have more information about which memcached
242 // backend server failed. This is a best effort.
243 addr, addrErr := c.serverList.PickServer(item.Key)
244 if addrErr != nil {
245 return err
246 }
247
248 return fmt.Errorf("server=%s: %w", addr, err)
249}
250
251func (c *memcachedClient) updateLoop(updateInterval time.Duration) {
252 defer c.wait.Done()

Callers

nothing calls this directly

Calls 3

PickServerMethod · 0.80
IncMethod · 0.65
SetMethod · 0.65

Tested by

no test coverage detected