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

Method SetMsgPackWithContext

shared_state.go:148–154  ·  view source on GitHub ↗
(ctx context.Context, key string, v any, ttl time.Duration)

Source from the content-addressed store, hash-verified

146}
147
148func (s *SharedState) SetMsgPackWithContext(ctx context.Context, key string, v any, ttl time.Duration) error {
149 if err := s.ensureStorage(); err != nil {
150 return err
151 }
152
153 return s.setEncodedWithContext(ctx, key, v, ttl, s.msgPackEncoder, "msgpack")
154}
155
156func (s *SharedState) GetMsgPack(key string, out any) ([]byte, bool, error) { //nolint:gocritic // Keep unnamed returns for clarity.
157 return s.GetMsgPackWithContext(context.Background(), key, out)

Callers 1

SetMsgPackMethod · 0.95

Calls 2

ensureStorageMethod · 0.95
setEncodedWithContextMethod · 0.95

Tested by

no test coverage detected