protocol

package
v0.0.0-...-64b8ef3 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2019 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Compression_name = map[int32]string{
	0: "NONE",
	1: "ZLIB",
	2: "GZIP",
}
View Source
var Compression_value = map[string]int32{
	"NONE": 0,
	"ZLIB": 1,
	"GZIP": 2,
}
View Source
var InnerType_name = map[int32]string{
	0:   "DECIMAL",
	1:   "TINY",
	2:   "SHORT",
	3:   "LONG",
	4:   "FLOAT",
	5:   "DOUBLE",
	6:   "NULL",
	7:   "TIMESTAMP",
	8:   "LONGLONG",
	9:   "INT24",
	10:  "DATE",
	11:  "TIME",
	12:  "DATETIME",
	13:  "YEAR",
	14:  "NEWDATE",
	15:  "VARCHAR",
	16:  "BIT",
	17:  "TIMESTAMP2",
	18:  "DATETIME2",
	19:  "TIME2",
	245: "JSON",
	246: "NEWDECIMAL",
	247: "ENUM",
	248: "SET",
	249: "TINY_BLOB",
	250: "MEDIUM_BLOB",
	251: "LONG_BLOB",
	252: "BLOB",
	253: "VAR_STRING",
	254: "STRING",
	255: "GEOMETRY",
}
View Source
var InnerType_value = map[string]int32{
	"DECIMAL":     0,
	"TINY":        1,
	"SHORT":       2,
	"LONG":        3,
	"FLOAT":       4,
	"DOUBLE":      5,
	"NULL":        6,
	"TIMESTAMP":   7,
	"LONGLONG":    8,
	"INT24":       9,
	"DATE":        10,
	"TIME":        11,
	"DATETIME":    12,
	"YEAR":        13,
	"NEWDATE":     14,
	"VARCHAR":     15,
	"BIT":         16,
	"TIMESTAMP2":  17,
	"DATETIME2":   18,
	"TIME2":       19,
	"JSON":        245,
	"NEWDECIMAL":  246,
	"ENUM":        247,
	"SET":         248,
	"TINY_BLOB":   249,
	"MEDIUM_BLOB": 250,
	"LONG_BLOB":   251,
	"BLOB":        252,
	"VAR_STRING":  253,
	"STRING":      254,
	"GEOMETRY":    255,
}
View Source
var OperationType_name = map[int32]string{
	0: "ROTATE",
	1: "GTID",
	2: "BEGIN",
	3: "COMMIT",
	4: "INSERT",
	5: "UPDATE",
	6: "DELETE",
	7: "QUERY",
	8: "DDL",
}
View Source
var OperationType_value = map[string]int32{
	"ROTATE": 0,
	"GTID":   1,
	"BEGIN":  2,
	"COMMIT": 3,
	"INSERT": 4,
	"UPDATE": 5,
	"DELETE": 6,
	"QUERY":  7,
	"DDL":    8,
}

Functions

This section is empty.

Types

type Column

type Column struct {
	IsNull               bool     `protobuf:"varint,1,opt,name=is_null,json=isNull,proto3" json:"is_null,omitempty"`
	Value                string   `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Column) Descriptor

func (*Column) Descriptor() ([]byte, []int)

func (*Column) GetIsNull

func (m *Column) GetIsNull() bool

func (*Column) GetValue

func (m *Column) GetValue() string

func (*Column) ProtoMessage

func (*Column) ProtoMessage()

func (*Column) Reset

func (m *Column) Reset()

func (*Column) String

func (m *Column) String() string

func (*Column) XXX_DiscardUnknown

func (m *Column) XXX_DiscardUnknown()

func (*Column) XXX_Marshal

func (m *Column) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Column) XXX_Merge

func (m *Column) XXX_Merge(src proto.Message)

func (*Column) XXX_Size

func (m *Column) XXX_Size() int

func (*Column) XXX_Unmarshal

func (m *Column) XXX_Unmarshal(b []byte) error

type ColumnDef

type ColumnDef struct {
	Name                 string    `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	SqlType              string    `protobuf:"bytes,2,opt,name=sql_type,json=sqlType,proto3" json:"sql_type,omitempty"`
	InnerType            InnerType `protobuf:"varint,3,opt,name=inner_type,json=innerType,proto3,enum=InnerType" json:"inner_type,omitempty"`
	Unsigned             bool      `protobuf:"varint,4,opt,name=unsigned,proto3" json:"unsigned,omitempty"`
	Key                  string    `protobuf:"bytes,5,opt,name=key,proto3" json:"key,omitempty"`
	Charset              string    `protobuf:"bytes,6,opt,name=charset,proto3" json:"charset,omitempty"`
	XXX_NoUnkeyedLiteral struct{}  `json:"-"`
	XXX_unrecognized     []byte    `json:"-"`
	XXX_sizecache        int32     `json:"-"`
}

func (*ColumnDef) Descriptor

func (*ColumnDef) Descriptor() ([]byte, []int)

func (*ColumnDef) GetCharset

func (m *ColumnDef) GetCharset() string

func (*ColumnDef) GetInnerType

func (m *ColumnDef) GetInnerType() InnerType

func (*ColumnDef) GetKey

func (m *ColumnDef) GetKey() string

func (*ColumnDef) GetName

func (m *ColumnDef) GetName() string

func (*ColumnDef) GetSqlType

func (m *ColumnDef) GetSqlType() string

func (*ColumnDef) GetUnsigned

func (m *ColumnDef) GetUnsigned() bool

func (*ColumnDef) ProtoMessage

func (*ColumnDef) ProtoMessage()

func (*ColumnDef) Reset

func (m *ColumnDef) Reset()

func (*ColumnDef) String

func (m *ColumnDef) String() string

func (*ColumnDef) XXX_DiscardUnknown

func (m *ColumnDef) XXX_DiscardUnknown()

func (*ColumnDef) XXX_Marshal

func (m *ColumnDef) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ColumnDef) XXX_Merge

func (m *ColumnDef) XXX_Merge(src proto.Message)

func (*ColumnDef) XXX_Size

func (m *ColumnDef) XXX_Size() int

func (*ColumnDef) XXX_Unmarshal

func (m *ColumnDef) XXX_Unmarshal(b []byte) error

type Compression

type Compression int32
const (
	Compression_NONE Compression = 0
	Compression_ZLIB Compression = 1
	Compression_GZIP Compression = 2
)

func (Compression) EnumDescriptor

func (Compression) EnumDescriptor() ([]byte, []int)

func (Compression) String

func (x Compression) String() string

type InnerType

type InnerType int32
const (
	InnerType_DECIMAL     InnerType = 0
	InnerType_TINY        InnerType = 1
	InnerType_SHORT       InnerType = 2
	InnerType_LONG        InnerType = 3
	InnerType_FLOAT       InnerType = 4
	InnerType_DOUBLE      InnerType = 5
	InnerType_NULL        InnerType = 6
	InnerType_TIMESTAMP   InnerType = 7
	InnerType_LONGLONG    InnerType = 8
	InnerType_INT24       InnerType = 9
	InnerType_DATE        InnerType = 10
	InnerType_TIME        InnerType = 11
	InnerType_DATETIME    InnerType = 12
	InnerType_YEAR        InnerType = 13
	InnerType_NEWDATE     InnerType = 14
	InnerType_VARCHAR     InnerType = 15
	InnerType_BIT         InnerType = 16
	InnerType_TIMESTAMP2  InnerType = 17
	InnerType_DATETIME2   InnerType = 18
	InnerType_TIME2       InnerType = 19
	InnerType_JSON        InnerType = 245
	InnerType_NEWDECIMAL  InnerType = 246
	InnerType_ENUM        InnerType = 247
	InnerType_SET         InnerType = 248
	InnerType_TINY_BLOB   InnerType = 249
	InnerType_MEDIUM_BLOB InnerType = 250
	InnerType_LONG_BLOB   InnerType = 251
	InnerType_BLOB        InnerType = 252
	InnerType_VAR_STRING  InnerType = 253
	InnerType_STRING      InnerType = 254
	InnerType_GEOMETRY    InnerType = 255
)

func (InnerType) EnumDescriptor

func (InnerType) EnumDescriptor() ([]byte, []int)

func (InnerType) String

func (x InnerType) String() string

type Message

type Message struct {
	Version uint32 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"`
	// The producer who produces this kafka message
	ProducerId uint64 `protobuf:"varint,2,opt,name=producer_id,json=producerId,proto3" json:"producer_id,omitempty"`
	// The sequence number of message, we dedup by this number
	Seq uint64 `protobuf:"varint,5,opt,name=seq,proto3" json:"seq,omitempty"`
	// If this message is a fragment, and there are more fragments coming.
	// Only all fragments of the same group received, we can unmarshal the payload.
	MoreFragment bool `protobuf:"varint,6,opt,name=more_fragment,json=moreFragment,proto3" json:"more_fragment,omitempty"`
	// The group identify of those fragment
	GroupId              uint64      `protobuf:"varint,7,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"`
	Compression          Compression `protobuf:"varint,8,opt,name=compression,proto3,enum=Compression" json:"compression,omitempty"`
	Payload              []byte      `protobuf:"bytes,15,opt,name=payload,proto3" json:"payload,omitempty"`
	XXX_NoUnkeyedLiteral struct{}    `json:"-"`
	XXX_unrecognized     []byte      `json:"-"`
	XXX_sizecache        int32       `json:"-"`
}

func (*Message) Descriptor

func (*Message) Descriptor() ([]byte, []int)

func (*Message) GetCompression

func (m *Message) GetCompression() Compression

func (*Message) GetGroupId

func (m *Message) GetGroupId() uint64

func (*Message) GetMoreFragment

func (m *Message) GetMoreFragment() bool

func (*Message) GetPayload

func (m *Message) GetPayload() []byte

func (*Message) GetProducerId

func (m *Message) GetProducerId() uint64

func (*Message) GetSeq

func (m *Message) GetSeq() uint64

func (*Message) GetVersion

func (m *Message) GetVersion() uint32

func (*Message) ProtoMessage

func (*Message) ProtoMessage()

func (*Message) Reset

func (m *Message) Reset()

func (*Message) String

func (m *Message) String() string

func (*Message) XXX_DiscardUnknown

func (m *Message) XXX_DiscardUnknown()

func (*Message) XXX_Marshal

func (m *Message) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Message) XXX_Merge

func (m *Message) XXX_Merge(src proto.Message)

func (*Message) XXX_Size

func (m *Message) XXX_Size() int

func (*Message) XXX_Unmarshal

func (m *Message) XXX_Unmarshal(b []byte) error

type Operation

type Operation struct {
	Header *OperationHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
	// Next_log_name and next_log_pos field is for Rotate operation
	NextLogName string `protobuf:"bytes,6,opt,name=next_log_name,json=nextLogName,proto3" json:"next_log_name,omitempty"`
	NextLogPos  uint32 `protobuf:"varint,7,opt,name=next_log_pos,json=nextLogPos,proto3" json:"next_log_pos,omitempty"`
	// Gtid, last_committed and sequence_number field is for GTID operation
	Gtid           string `protobuf:"bytes,8,opt,name=gtid,proto3" json:"gtid,omitempty"`
	LastCommitted  int64  `protobuf:"varint,9,opt,name=last_committed,json=lastCommitted,proto3" json:"last_committed,omitempty"`
	SequenceNumber int64  `protobuf:"varint,10,opt,name=sequence_number,json=sequenceNumber,proto3" json:"sequence_number,omitempty"`
	// Database and  statement filed is for QUERY/DDL operation
	Database  string `protobuf:"bytes,11,opt,name=database,proto3" json:"database,omitempty"`
	Statement string `protobuf:"bytes,12,opt,name=statement,proto3" json:"statement,omitempty"`
	// Table and rows field is for INSERT/UPDATE/DELETE operation
	Table *TableDef `protobuf:"bytes,13,opt,name=table,proto3" json:"table,omitempty"`
	// Rows field is for INSERT/UPDATE/DELETE operation
	Rows []*Row `protobuf:"bytes,14,rep,name=rows,proto3" json:"rows,omitempty"`
	// Progress field is for COMMIT/DDL operation,represents the gtid_set or file&pos
	Progress             *Progress `protobuf:"bytes,15,opt,name=progress,proto3" json:"progress,omitempty"`
	XXX_NoUnkeyedLiteral struct{}  `json:"-"`
	XXX_unrecognized     []byte    `json:"-"`
	XXX_sizecache        int32     `json:"-"`
}

func (*Operation) Descriptor

func (*Operation) Descriptor() ([]byte, []int)

func (*Operation) GetDatabase

func (m *Operation) GetDatabase() string

func (*Operation) GetGtid

func (m *Operation) GetGtid() string

func (*Operation) GetHeader

func (m *Operation) GetHeader() *OperationHeader

func (*Operation) GetLastCommitted

func (m *Operation) GetLastCommitted() int64

func (*Operation) GetNextLogName

func (m *Operation) GetNextLogName() string

func (*Operation) GetNextLogPos

func (m *Operation) GetNextLogPos() uint32

func (*Operation) GetProgress

func (m *Operation) GetProgress() *Progress

func (*Operation) GetRows

func (m *Operation) GetRows() []*Row

func (*Operation) GetSequenceNumber

func (m *Operation) GetSequenceNumber() int64

func (*Operation) GetStatement

func (m *Operation) GetStatement() string

func (*Operation) GetTable

func (m *Operation) GetTable() *TableDef

func (*Operation) ProtoMessage

func (*Operation) ProtoMessage()

func (*Operation) Reset

func (m *Operation) Reset()

func (*Operation) String

func (m *Operation) String() string

func (*Operation) XXX_DiscardUnknown

func (m *Operation) XXX_DiscardUnknown()

func (*Operation) XXX_Marshal

func (m *Operation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Operation) XXX_Merge

func (m *Operation) XXX_Merge(src proto.Message)

func (*Operation) XXX_Size

func (m *Operation) XXX_Size() int

func (*Operation) XXX_Unmarshal

func (m *Operation) XXX_Unmarshal(b []byte) error

type OperationHeader

type OperationHeader struct {
	ServerId             uint32        `protobuf:"varint,1,opt,name=server_id,json=serverId,proto3" json:"server_id,omitempty"`
	Type                 OperationType `protobuf:"varint,2,opt,name=type,proto3,enum=OperationType" json:"type,omitempty"`
	Timestamp            uint32        `protobuf:"varint,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	LogPos               uint32        `protobuf:"varint,4,opt,name=log_pos,json=logPos,proto3" json:"log_pos,omitempty"`
	XXX_NoUnkeyedLiteral struct{}      `json:"-"`
	XXX_unrecognized     []byte        `json:"-"`
	XXX_sizecache        int32         `json:"-"`
}

func (*OperationHeader) Descriptor

func (*OperationHeader) Descriptor() ([]byte, []int)

func (*OperationHeader) GetLogPos

func (m *OperationHeader) GetLogPos() uint32

func (*OperationHeader) GetServerId

func (m *OperationHeader) GetServerId() uint32

func (*OperationHeader) GetTimestamp

func (m *OperationHeader) GetTimestamp() uint32

func (*OperationHeader) GetType

func (m *OperationHeader) GetType() OperationType

func (*OperationHeader) ProtoMessage

func (*OperationHeader) ProtoMessage()

func (*OperationHeader) Reset

func (m *OperationHeader) Reset()

func (*OperationHeader) String

func (m *OperationHeader) String() string

func (*OperationHeader) XXX_DiscardUnknown

func (m *OperationHeader) XXX_DiscardUnknown()

func (*OperationHeader) XXX_Marshal

func (m *OperationHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*OperationHeader) XXX_Merge

func (m *OperationHeader) XXX_Merge(src proto.Message)

func (*OperationHeader) XXX_Size

func (m *OperationHeader) XXX_Size() int

func (*OperationHeader) XXX_Unmarshal

func (m *OperationHeader) XXX_Unmarshal(b []byte) error

type OperationType

type OperationType int32
const (
	OperationType_ROTATE OperationType = 0
	OperationType_GTID   OperationType = 1
	OperationType_BEGIN  OperationType = 2
	OperationType_COMMIT OperationType = 3
	OperationType_INSERT OperationType = 4
	OperationType_UPDATE OperationType = 5
	OperationType_DELETE OperationType = 6
	OperationType_QUERY  OperationType = 7
	OperationType_DDL    OperationType = 8
)

func (OperationType) EnumDescriptor

func (OperationType) EnumDescriptor() ([]byte, []int)

func (OperationType) String

func (x OperationType) String() string

type Payload

type Payload struct {
	Ops                  []*Operation `protobuf:"bytes,1,rep,name=ops,proto3" json:"ops,omitempty"`
	XXX_NoUnkeyedLiteral struct{}     `json:"-"`
	XXX_unrecognized     []byte       `json:"-"`
	XXX_sizecache        int32        `json:"-"`
}

func (*Payload) Descriptor

func (*Payload) Descriptor() ([]byte, []int)

func (*Payload) GetOps

func (m *Payload) GetOps() []*Operation

func (*Payload) ProtoMessage

func (*Payload) ProtoMessage()

func (*Payload) Reset

func (m *Payload) Reset()

func (*Payload) String

func (m *Payload) String() string

func (*Payload) XXX_DiscardUnknown

func (m *Payload) XXX_DiscardUnknown()

func (*Payload) XXX_Marshal

func (m *Payload) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Payload) XXX_Merge

func (m *Payload) XXX_Merge(src proto.Message)

func (*Payload) XXX_Size

func (m *Payload) XXX_Size() int

func (*Payload) XXX_Unmarshal

func (m *Payload) XXX_Unmarshal(b []byte) error

type Progress

type Progress struct {
	Flavor               string   `protobuf:"bytes,1,opt,name=flavor,proto3" json:"flavor,omitempty"`
	ServerId             uint32   `protobuf:"varint,2,opt,name=server_id,json=serverId,proto3" json:"server_id,omitempty"`
	LogName              string   `protobuf:"bytes,3,opt,name=log_name,json=logName,proto3" json:"log_name,omitempty"`
	LogPos               uint32   `protobuf:"varint,4,opt,name=log_pos,json=logPos,proto3" json:"log_pos,omitempty"`
	Gset                 string   `protobuf:"bytes,5,opt,name=gset,proto3" json:"gset,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Progress) Descriptor

func (*Progress) Descriptor() ([]byte, []int)

func (*Progress) GetFlavor

func (m *Progress) GetFlavor() string

func (*Progress) GetGset

func (m *Progress) GetGset() string

func (*Progress) GetLogName

func (m *Progress) GetLogName() string

func (*Progress) GetLogPos

func (m *Progress) GetLogPos() uint32

func (*Progress) GetServerId

func (m *Progress) GetServerId() uint32

func (*Progress) ProtoMessage

func (*Progress) ProtoMessage()

func (*Progress) Reset

func (m *Progress) Reset()

func (*Progress) String

func (m *Progress) String() string

func (*Progress) XXX_DiscardUnknown

func (m *Progress) XXX_DiscardUnknown()

func (*Progress) XXX_Marshal

func (m *Progress) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Progress) XXX_Merge

func (m *Progress) XXX_Merge(src proto.Message)

func (*Progress) XXX_Size

func (m *Progress) XXX_Size() int

func (*Progress) XXX_Unmarshal

func (m *Progress) XXX_Unmarshal(b []byte) error

type Row

type Row struct {
	Before               []*Column `protobuf:"bytes,1,rep,name=before,proto3" json:"before,omitempty"`
	After                []*Column `protobuf:"bytes,2,rep,name=after,proto3" json:"after,omitempty"`
	XXX_NoUnkeyedLiteral struct{}  `json:"-"`
	XXX_unrecognized     []byte    `json:"-"`
	XXX_sizecache        int32     `json:"-"`
}

func (*Row) Descriptor

func (*Row) Descriptor() ([]byte, []int)

func (*Row) GetAfter

func (m *Row) GetAfter() []*Column

func (*Row) GetBefore

func (m *Row) GetBefore() []*Column

func (*Row) ProtoMessage

func (*Row) ProtoMessage()

func (*Row) Reset

func (m *Row) Reset()

func (*Row) String

func (m *Row) String() string

func (*Row) XXX_DiscardUnknown

func (m *Row) XXX_DiscardUnknown()

func (*Row) XXX_Marshal

func (m *Row) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Row) XXX_Merge

func (m *Row) XXX_Merge(src proto.Message)

func (*Row) XXX_Size

func (m *Row) XXX_Size() int

func (*Row) XXX_Unmarshal

func (m *Row) XXX_Unmarshal(b []byte) error

type TableDef

type TableDef struct {
	Database             string       `protobuf:"bytes,1,opt,name=database,proto3" json:"database,omitempty"`
	Name                 string       `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Columns              []*ColumnDef `protobuf:"bytes,3,rep,name=columns,proto3" json:"columns,omitempty"`
	XXX_NoUnkeyedLiteral struct{}     `json:"-"`
	XXX_unrecognized     []byte       `json:"-"`
	XXX_sizecache        int32        `json:"-"`
}

func (*TableDef) Descriptor

func (*TableDef) Descriptor() ([]byte, []int)

func (*TableDef) GetColumns

func (m *TableDef) GetColumns() []*ColumnDef

func (*TableDef) GetDatabase

func (m *TableDef) GetDatabase() string

func (*TableDef) GetName

func (m *TableDef) GetName() string

func (*TableDef) ProtoMessage

func (*TableDef) ProtoMessage()

func (*TableDef) Reset

func (m *TableDef) Reset()

func (*TableDef) String

func (m *TableDef) String() string

func (*TableDef) XXX_DiscardUnknown

func (m *TableDef) XXX_DiscardUnknown()

func (*TableDef) XXX_Marshal

func (m *TableDef) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*TableDef) XXX_Merge

func (m *TableDef) XXX_Merge(src proto.Message)

func (*TableDef) XXX_Size

func (m *TableDef) XXX_Size() int

func (*TableDef) XXX_Unmarshal

func (m *TableDef) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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