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

Method GetMsgPackWithContext

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

Source from the content-addressed store, hash-verified

158}
159
160func (s *SharedState) GetMsgPackWithContext(ctx context.Context, key string, out any) ([]byte, bool, error) { //nolint:gocritic // Keep unnamed returns for clarity.
161 if err := s.ensureStorage(); err != nil {
162 return nil, false, err
163 }
164
165 return s.getEncodedWithContext(ctx, key, out, s.msgPackDecoder, "msgpack")
166}
167
168func (s *SharedState) SetCBOR(key string, v any, ttl time.Duration) error {
169 return s.SetCBORWithContext(context.Background(), key, v, ttl)

Callers 1

GetMsgPackMethod · 0.95

Calls 2

ensureStorageMethod · 0.95
getEncodedWithContextMethod · 0.95

Tested by

no test coverage detected