Documentation ¶
Index ¶
- type TopicPartition
- func (tp TopicPartition) Check() validation.ErrorGroup
- func (tp TopicPartition) Equals(v any) bool
- func (TopicPartition) Generate(rand *rand.Rand, size int) reflect.Value
- func (tp TopicPartition) MarshalBinary() (data []byte, err error)
- func (tp TopicPartition) MarshalBinaryWriter(w io.Writer) error
- func (tp TopicPartition) String() string
- func (tp *TopicPartition) UnmarshalBinary(data []byte) error
- func (tp *TopicPartition) UnmarshalBinaryReader(r io.Reader) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TopicPartition ¶
type TopicPartition struct { Topic topic.Topic `json:"topic"` Partition partition.Partition `json:"partition"` }
TopicPartition represents an individual Partition of a Topic.
func Generate ¶
func Generate(rand *rand.Rand) TopicPartition
Generate a random TopicPartition value.
func New ¶
func New(t topic.Topic, p partition.Partition) (TopicPartition, validation.ErrorGroup)
New creates and validates a new TopicPartition from the given Topic/Partition.
func (TopicPartition) Check ¶
func (tp TopicPartition) Check() validation.ErrorGroup
Check runs default validation checks for the TopicPartition.
func (TopicPartition) Equals ¶
func (tp TopicPartition) Equals(v any) bool
Equals compares two TopicPartition instances for equality.
Interface: comparison.Equaler
func (TopicPartition) MarshalBinary ¶
func (tp TopicPartition) MarshalBinary() (data []byte, err error)
MarshalBinary coverts the TopicPartition instance to binary form.
Interface: encoding.BinaryMarshaler
func (TopicPartition) MarshalBinaryWriter ¶
func (tp TopicPartition) MarshalBinaryWriter(w io.Writer) error
MarshalBinaryWriter populates the io.Writer with TopicPartition fields in its binary form.
func (TopicPartition) String ¶
func (tp TopicPartition) String() string
String value of the TopicPartition.
Interface: fmt.Stringer.
func (*TopicPartition) UnmarshalBinary ¶
func (tp *TopicPartition) UnmarshalBinary(data []byte) error
UnmarshalBinary converts the binary form to a TopicPartition instance.
Interface: encoding.BinaryUnmarshaler
func (*TopicPartition) UnmarshalBinaryReader ¶
func (tp *TopicPartition) UnmarshalBinaryReader(r io.Reader) error
UnmarshalBinaryReader populates TopicPartition fields from an io.Reader returning the binary form.