Documentation ¶
Index ¶
- type Metadata
- func (m Metadata) Check() validation.ErrorGroup
- func (m Metadata) Equals(v any) bool
- func (Metadata) Generate(rand *rand.Rand, size int) reflect.Value
- func (m Metadata) MarshalBinary() (data []byte, err error)
- func (m Metadata) MarshalBinaryWriter(w io.Writer) (err error)
- func (m Metadata) String() string
- func (m *Metadata) UnmarshalBinary(data []byte) error
- func (m *Metadata) UnmarshalBinaryReader(r io.Reader) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Metadata ¶
type Metadata struct { Partition partition.Partition `json:"partition"` Offset offset.Offset `json:"offset"` Timestamp timestamp.Timestamp `json:"timestamp"` Topic topic.Topic `json:"topic"` }
func New ¶
func New( p partition.Partition, o offset.Offset, ts timestamp.Timestamp, t topic.Topic, ) (Metadata, validation.ErrorGroup)
New creates and validates a new Metadata from the given fields.
func (Metadata) Check ¶
func (m Metadata) Check() validation.ErrorGroup
Check runs default validation checks for the Metadata.
func (Metadata) Equals ¶
Equals compares two Metadata instances for equality.
Interface: comparison.Equaler
func (Metadata) MarshalBinary ¶
MarshalBinary converts the Metadata instance to binary form.
Interface: encoding.BinaryMarshaler
func (Metadata) MarshalBinaryWriter ¶
MarshalBinaryWriter populates the io.Writer with Metadata fields in its binary form.
func (*Metadata) UnmarshalBinary ¶
UnmarshalBinary converts the binary form to a Metadata instance.
Interface: encoding.BinaryUnmarshaler
Click to show internal directories.
Click to hide internal directories.