(ctx context.Context, key string, v any, ttl time.Duration)
| 146 | } |
| 147 | |
| 148 | func (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 | |
| 156 | func (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) |
no test coverage detected