MCPcopy
hub / github.com/gofiber/fiber / GetCBORWithContext

Method GetCBORWithContext

shared_state.go:184–190  ·  view source on GitHub ↗
(ctx context.Context, key string, out any)

Source from the content-addressed store, hash-verified

182}
183
184func (s *SharedState) GetCBORWithContext(ctx context.Context, key string, out any) ([]byte, bool, error) { //nolint:gocritic // Keep unnamed returns for clarity.
185 if err := s.ensureStorage(); err != nil {
186 return nil, false, err
187 }
188
189 return s.getEncodedWithContext(ctx, key, out, s.cborDecoder, "cbor")
190}
191
192func (s *SharedState) SetXML(key string, v any, ttl time.Duration) error {
193 return s.SetXMLWithContext(context.Background(), key, v, ttl)

Callers 1

GetCBORMethod · 0.95

Calls 2

ensureStorageMethod · 0.95
getEncodedWithContextMethod · 0.95

Tested by

no test coverage detected