(ctx context.Context, key string, out any)
| 134 | } |
| 135 | |
| 136 | func (s *SharedState) GetJSONWithContext(ctx context.Context, key string, out any) ([]byte, bool, error) { //nolint:gocritic // Keep unnamed returns for clarity. |
| 137 | if err := s.ensureStorage(); err != nil { |
| 138 | return nil, false, err |
| 139 | } |
| 140 | |
| 141 | return s.getEncodedWithContext(ctx, key, out, s.jsonDecoder, "json") |
| 142 | } |
| 143 | |
| 144 | func (s *SharedState) SetMsgPack(key string, v any, ttl time.Duration) error { |
| 145 | return s.SetMsgPackWithContext(context.Background(), key, v, ttl) |