types

package
v1.1.0-beta Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2020 License: MIT Imports: 2 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 (
	// InputMySQL defines input of type to be MySQL
	InputMySQL = "mysql"
)
View Source
const MySQLBoolean = "tinyint(1)"

MySQLBoolean represents MySQL equivalent of boolean type

View Source
const MySvcName = "storagetapper"

MySvcName is a name of this service

Variables

View Source
var MyClusterName = "storagetapper"

MyClusterName is a cluster name this service will use to save state to

View Source
var MyDBName = "storagetapper"

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

View Source
var TestMySQLPassword = "storagetapper"

TestMySQLPassword is MySQL password used to connect to MySQL in test

View Source
var TestMySQLUser = "storagetapper"

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"`
	SchemaVersion int             `json:",omitempty"`
	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 represents single field of the CommonFormatEvent

type RowMessage

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

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