Documentation
¶
Overview ¶
Package protosink provides a cache.Sink using Protobuf encoding
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewProtoSink ¶ added in v0.1.0
func NewProtoSink[T any, M ProtoMessage[T]]() cache.TSink[T]
NewProtoSink creates a ProtoSink for a particular proto.Message type
Types ¶
type ProtoMessage ¶ added in v0.1.0
ProtoMessage is a generic constraint for a type which pointer implements proto.Message
type ProtoSink ¶
type ProtoSink[T any, M ProtoMessage[T]] struct { cache.ByteSink // contains filtered or unexported fields }
ProtoSink is a Sink using Proto for encoding
func (*ProtoSink[T, M]) Reset ¶
func (sink *ProtoSink[T, M]) Reset()
Reset clears everything but the type pointer assigned during creation
func (*ProtoSink[T, M]) SetBytes ¶
SetBytes sets the object of the ProtoSink and its expiration time from a Protobuf encoded byte array
Click to show internal directories.
Click to hide internal directories.