types

package
v0.0.0-...-ab40c3c Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2019 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AvroNULL    AvroPrimitiveType = "null"
	AvroBOOLEAN AvroPrimitiveType = "boolean"
	AvroINT     AvroPrimitiveType = "int"
	AvroLONG    AvroPrimitiveType = "long"
	AvroFLOAT   AvroPrimitiveType = "float"
	AvroDOUBLE  AvroPrimitiveType = "double"
	AvroBYTES   AvroPrimitiveType = "bytes"
	AvroSTRING  AvroPrimitiveType = "string"

	AvroRECORD AvroComplexType = "record"
)

Avro data types

View Source
const (
	Insert int = iota
	Delete int = iota
	Schema int = iota
)

CommonFormatEvent types

View Source
const MyDbName = "storagetapper"

MyDbName is a database name this service will use to save state to

View Source
const MySvcName = "storagetapper"

MySvcName is a name of this service

Variables

View Source
var TestMySQLPassword = ""

TestMySQLPassword is MySQL password used to connect to MySQL in test

View Source
var TestMySQLUser = "root"

TestMySQLUser is MySQL user used to connect to MySQL in test

Functions

This section is empty.

Types

type AvroComplexType

type AvroComplexType string

AvroComplexType is declared to improve readability AvroSchema/AvroFields

type AvroField

type AvroField struct {
	Name    string              `json:"name"`
	Type    []AvroPrimitiveType `json:"type"`
	Default interface{}         `json:"default,omitempty"`
	Doc     string              `json:"doc,omitempty"`
}

AvroField represents structure of each of the fields in the schema

type AvroPrimitiveType

type AvroPrimitiveType string

AvroPrimitiveType is declared to improve readability AvroSchema/AvroFields declarations

type AvroSchema

type AvroSchema struct {
	Fields        []AvroField     `json:"fields"`
	Name          string          `json:"name"`
	Namespace     string          `json:"namespace"`
	Owner         string          `json:"owner"`
	SchemaID      int             `json:"schema_id"`
	SchemaVersion int             `json:"schemaVersion"`
	Type          AvroComplexType `json:"type"`
	Doc           string          `json:"doc,omitempty"`
	LastModified  string          `json:"last_modified,omitempty"`
}

AvroSchema represents the structure of Avro schema format

type ColumnSchema

type ColumnSchema struct {
	Name                   string
	OrdinalPosition        uint64
	IsNullable             string
	DataType               string
	CharacterMaximumLength sql.NullInt64
	NumericPrecision       sql.NullInt64
	NumericScale           sql.NullInt64
	Type                   string
	Key                    string
}

ColumnSchema is struct for each Column schema

type CommonFormatEvent

type CommonFormatEvent struct {
	Type      string //insert, delete, schema
	Key       []interface{}
	SeqNo     uint64
	Timestamp int64                //This only used for metrics, to measure time in buffer
	Fields    *[]CommonFormatField `json:",omitempty"`
}

CommonFormatEvent is a generic format which represents single data modification event

type CommonFormatField

type CommonFormatField struct {
	Name  string
	Value interface{}
}

CommonFormatField refresent single field of the CommonFormatEvent

type RowMessage

type RowMessage struct {
	Type  int
	Key   string
	Data  *[]interface{}
	SeqNo uint64
}

RowMessage is used to pass message to the local streamer

type TableLoc

type TableLoc struct {
	Service string
	Cluster string
	Db      string
	Table   string
	Input   string
	Output  string
	Version int
}

TableLoc - table location

type TableSchema

type TableSchema struct {
	DBName    string
	TableName string
	Columns   []ColumnSchema
}

TableSchema represents table schema from information_schema

Jump to

Keyboard shortcuts

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