avro

package
v3.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2017 License: MIT Imports: 6 Imported by: 4

Documentation

Index

Constants

View Source
const (
	DemoSchemaSchema = "" /* 354-byte string literal not displayed */
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AvroContainerBlock

type AvroContainerBlock struct {
	NumRecords  int64
	RecordBytes []byte
	Sync        Sync
}

func DeserializeAvroContainerBlock

func DeserializeAvroContainerBlock(r io.Reader) (*AvroContainerBlock, error)

func (AvroContainerBlock) Serialize

func (r AvroContainerBlock) Serialize(w io.Writer) error

type AvroContainerHeader

type AvroContainerHeader struct {
	Magic Magic
	Meta  map[string][]byte
	Sync  Sync
}

func DeserializeAvroContainerHeader

func DeserializeAvroContainerHeader(r io.Reader) (*AvroContainerHeader, error)

func (AvroContainerHeader) Serialize

func (r AvroContainerHeader) Serialize(w io.Writer) error

type ByteReader

type ByteReader interface {
	ReadByte() (byte, error)
}

type ByteWriter

type ByteWriter interface {
	Grow(int)
	WriteByte(byte) error
}

type Codec

type Codec string
const (
	Null    Codec = "null"
	Deflate Codec = "deflate"
	Snappy  Codec = "snappy"
)

type DemoSchema

type DemoSchema struct {
	IntField    int32
	DoubleField float64
	StringField string
	BoolField   bool
	BytesField  []byte
}

func DeserializeDemoSchema

func DeserializeDemoSchema(r io.Reader) (*DemoSchema, error)

func (DemoSchema) Serialize

func (r DemoSchema) Serialize(w io.Writer) error

type DemoSchemaContainerWriter

type DemoSchemaContainerWriter struct {
	// contains filtered or unexported fields
}

func NewDemoSchemaContainerWriter

func NewDemoSchemaContainerWriter(writer io.Writer, codec Codec, recordsPerBlock int64) (*DemoSchemaContainerWriter, error)

func (*DemoSchemaContainerWriter) Flush

func (avroWriter *DemoSchemaContainerWriter) Flush() error

func (*DemoSchemaContainerWriter) WriteRecord

func (avroWriter *DemoSchemaContainerWriter) WriteRecord(record DemoSchema) error

type FlushableResettableWriter

type FlushableResettableWriter interface {
	Flush() error
	Reset(io.Writer)
}

type Magic

type Magic [4]byte

type StringWriter

type StringWriter interface {
	WriteString(string) (int, error)
}

type Sync

type Sync [16]byte

Jump to

Keyboard shortcuts

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