Documentation
¶
Overview ¶
Package codec provides encode/decode interfaces for cache serialization.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Codec ¶
type Codec interface {
// Marshal serializes v into bytes.
Marshal(v any) ([]byte, error)
// Unmarshal deserializes data into v (must be a pointer).
Unmarshal(data []byte, v any) error
// Name returns the codec identifier used for diagnostics.
Name() string
}
Codec encodes and decodes values for cache storage.
type JSON ¶
type JSON struct{}
JSON is the default codec using standard library encoding/json.
Click to show internal directories.
Click to hide internal directories.