(ctx context.Context, key string, v any, ttl time.Duration)
| 170 | } |
| 171 | |
| 172 | func (s *SharedState) SetCBORWithContext(ctx context.Context, key string, v any, ttl time.Duration) error { |
| 173 | if err := s.ensureStorage(); err != nil { |
| 174 | return err |
| 175 | } |
| 176 | |
| 177 | return s.setEncodedWithContext(ctx, key, v, ttl, s.cborEncoder, "cbor") |
| 178 | } |
| 179 | |
| 180 | func (s *SharedState) GetCBOR(key string, out any) ([]byte, bool, error) { //nolint:gocritic // Keep unnamed returns for clarity. |
| 181 | return s.GetCBORWithContext(context.Background(), key, out) |
no test coverage detected