metadata

package
v0.0.0-...-a26ebea Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 7, 2022 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

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 Generate

func Generate(rand *rand.Rand) Metadata

Generate a random Metadata value.

func New

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

func (m Metadata) Equals(v any) bool

Equals compares two Metadata instances for equality.

Interface: comparison.Equaler

func (Metadata) Generate

func (Metadata) Generate(rand *rand.Rand, size int) reflect.Value

Generate random Metadata values.

Interface: quick.Generator

func (Metadata) MarshalBinary

func (m Metadata) MarshalBinary() (data []byte, err error)

MarshalBinary converts the Metadata instance to binary form.

Interface: encoding.BinaryMarshaler

func (Metadata) MarshalBinaryWriter

func (m Metadata) MarshalBinaryWriter(w io.Writer) (err error)

MarshalBinaryWriter populates the io.Writer with Metadata fields in its binary form.

func (Metadata) String

func (m Metadata) String() string

String value of the Metadata.

Interface: fmt.Stringer.

func (*Metadata) UnmarshalBinary

func (m *Metadata) UnmarshalBinary(data []byte) error

UnmarshalBinary converts the binary form to a Metadata instance.

Interface: encoding.BinaryUnmarshaler

func (*Metadata) UnmarshalBinaryReader

func (m *Metadata) UnmarshalBinaryReader(r io.Reader) error

UnmarshalBinaryReader populates Metadata fields from an io.Reader returning the binary form.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL