Documentation
¶
Overview ¶
Package wire implements the persistent entry envelope and the invalidation message format shared by the serialized backends. Both formats are versioned; readers must understand a version before any writer emits it.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrInvalidEnvelope = errors.New("cache: invalid entry envelope")
ErrInvalidEnvelope reports a truncated envelope or an unknown version.
Functions ¶
func DecodeInvalidation ¶
func DecodeInvalidation[K comparable](encoded []byte, codec cache.Codec[K]) (cache.InvalidationEvent[K], error)
DecodeInvalidation decodes a remote invalidation event.
func EncodeInvalidation ¶
func EncodeInvalidation[K comparable](event cache.InvalidationEvent[K], codec cache.Codec[K]) ([]byte, error)
EncodeInvalidation encodes an invalidation event for a remote transport.
Types ¶
type Encoder ¶
type Encoder[K comparable, V any] struct { // contains filtered or unexported fields }
Encoder canonicalizes keys and serializes cache entries.