Documentation ¶
Index ¶
Constants ¶
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
CommonFormatEvent types
const MyDbName = "storagetapper"
MyDbName is a database name this service will use to save state to
const MySvcName = "storagetapper"
MySvcName is a name of this service
Variables ¶
var TestMySQLPassword = ""
TestMySQLPassword is MySQL password used to connect to MySQL in test
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 ¶
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