record

package
v0.0.30 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2022 License: BSD-3-Clause Imports: 3 Imported by: 1

Documentation

Overview

Package record implements functions for marshaling and unmarshaling individual Kafka records.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Record

type Record struct {
	Len            int64
	Attributes     int8
	TimestampDelta int64
	OffsetDelta    int64
	KeyLen         int64
	Key            []byte
	ValueLen       int64
	Value          []byte
}

func New

func New(key, value []byte) *Record

func Unmarshal

func Unmarshal(b []byte) (*Record, error)

func (*Record) Marshal

func (r *Record) Marshal() []byte

func (*Record) Marshal2 added in v0.0.21

func (r *Record) Marshal2(b []byte) []byte

func (*Record) Marshal3 added in v0.0.21

func (r *Record) Marshal3() []byte

func (*Record) Marshal4 added in v0.0.22

func (r *Record) Marshal4(tmp, header []byte, dst io.Writer)

Jump to

Keyboard shortcuts

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