soe

package
v6.5.0 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package soe provides convenience methods to read and write Avro Single-Object Encoding headers

Index

Constants

This section is empty.

Variables

View Source
var HeaderV1 = []byte{0xC3, 0x01}

Functions

func ReadHeader

func ReadHeader(r io.Reader) ([]byte, error)

ReadHeader reads the magic bytes and CRC64 schema fingerprint from the given reader and returns the fingerprint.

func WriteRecord

func WriteRecord(w io.Writer, record AvroRecord) error

WriteRecord writes the single-object encoding framing (the magic bytes and the Avro CRC64 fingerprint of the canonical form of the record schema), and the record itself into `w`.

Types

type AvroRecord

type AvroRecord interface {
	Serialize(io.Writer) error
	AvroCRC64Fingerprint() []byte
}

AvroRecord is an interface fulfilled by the structs generated by gogen-avro for Avro records.

Jump to

Keyboard shortcuts

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