Documentation ¶
Overview ¶
Package protosink provides a cache.Sink using Protobuf encoding
Index ¶
- type ProtoSink
- func (sink *ProtoSink) Bytes() []byte
- func (sink *ProtoSink) Expire() time.Time
- func (sink *ProtoSink) Len() int
- func (sink *ProtoSink) Reset()
- func (sink *ProtoSink) SetBytes(v []byte, e time.Time) error
- func (sink *ProtoSink) SetString(s string, e time.Time) error
- func (sink *ProtoSink) SetValue(v any, e time.Time) error
- func (sink *ProtoSink) Value() proto.Message
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ProtoSink ¶
type ProtoSink struct {
// contains filtered or unexported fields
}
ProtoSink is a Sink using Proto for encoding
func (*ProtoSink) Bytes ¶
Bytes returns the Protobuf encoded representation of the object in the Sink.
func (*ProtoSink) Len ¶
Len returns the length of the Protobuf encoded representation of the object in the Sink. 0 if empty
func (*ProtoSink) Reset ¶
func (sink *ProtoSink) Reset()
Reset clears everything but the type pointer assigned during creation
func (*ProtoSink) SetBytes ¶
SetBytes sets the object of the ProtoSink and its expiration time from a Protobuf encoded byte array
func (*ProtoSink) SetString ¶
SetString sets the object of the ProtoSink and its expiration time from a Protobuf encoded string
Click to show internal directories.
Click to hide internal directories.