binlog

package
v0.0.0-...-40faf7d Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2016 License: Apache-2.0, Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package binlog is a generated protocol buffer package.

It is generated from these files:

binlog.proto

It has these top-level messages:

TableMutation
PrewriteValue
Binlog

Package binlog is a generated protocol buffer package.

It is generated from these files:

cistern.proto

It has these top-level messages:

DumpBinlogReq
DumpBinlogResp
DumpDDLJobsReq
DumpDDLJobsResp
GetLatestCommitTSReq
GetLatestCommitTSResp

Package binlog is a generated protocol buffer package.

It is generated from these files:

pump.proto

It has these top-level messages:

WriteBinlogReq
WriteBinlogResp
PullBinlogReq
PullBinlogResp
Pos
Entity

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthBinlog = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowBinlog   = fmt.Errorf("proto: integer overflow")
)
View Source
var (
	ErrInvalidLengthCistern = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowCistern   = fmt.Errorf("proto: integer overflow")
)
View Source
var (
	ErrInvalidLengthPump = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowPump   = fmt.Errorf("proto: integer overflow")
)
View Source
var BinlogType_name = map[int32]string{
	0: "Prewrite",
	1: "Commit",
	2: "Rollback",
	3: "PreDDL",
	4: "PostDDL",
}
View Source
var BinlogType_value = map[string]int32{
	"Prewrite": 0,
	"Commit":   1,
	"Rollback": 2,
	"PreDDL":   3,
	"PostDDL":  4,
}
View Source
var MutationType_name = map[int32]string{
	0: "Insert",
	1: "Update",
	2: "DeleteID",
	3: "DeletePK",
	4: "DeleteRow",
}
View Source
var MutationType_value = map[string]int32{
	"Insert":    0,
	"Update":    1,
	"DeleteID":  2,
	"DeletePK":  3,
	"DeleteRow": 4,
}

Functions

func RegisterCisternServer

func RegisterCisternServer(s *grpc.Server, srv CisternServer)

func RegisterPumpServer

func RegisterPumpServer(s *grpc.Server, srv PumpServer)

Types

type Binlog

type Binlog struct {
	Tp BinlogType `protobuf:"varint,1,opt,name=tp,enum=binlog.BinlogType" json:"tp"`
	// start_ts is used in Prewrite, Commit and Rollback binlog Type.
	// It is used for pairing prewrite log to commit log or rollback log.
	StartTs int64 `protobuf:"varint,2,opt,name=start_ts,json=startTs" json:"start_ts"`
	// commit_ts is used only in binlog type Commit.
	CommitTs int64 `protobuf:"varint,3,opt,name=commit_ts,json=commitTs" json:"commit_ts"`
	// prewrite key is used only in Prewrite binlog type.
	// It is the primary key of the transaction, is used to check that the transaction is
	// commited or not if it failed to pair to commit log or rollback log within a time window.
	PrewriteKey []byte `protobuf:"bytes,4,opt,name=prewrite_key,json=prewriteKey" json:"prewrite_key,omitempty"`
	// prewrite_data is marshalled from PrewriteData type,
	// we do not need to unmarshal prewrite data before the binlog have been successfully paired.
	PrewriteValue []byte `protobuf:"bytes,5,opt,name=prewrite_value,json=prewriteValue" json:"prewrite_value,omitempty"`
	// ddl_query is the original ddl statement query, used for PreDDL type.
	DdlQuery []byte `protobuf:"bytes,6,opt,name=ddl_query,json=ddlQuery" json:"ddl_query,omitempty"`
	// ddl_job_id is used for PreDDL and PostDDL binlog type.
	// If PreDDL has matching PostDDL with the same job_id, we can execute the DDL right away, otherwise,
	// we can use the job_id to check if the ddl statement has been successfully added to DDL job list.
	DdlJobId         int64  `protobuf:"varint,7,opt,name=ddl_job_id,json=ddlJobId" json:"ddl_job_id"`
	XXX_unrecognized []byte `json:"-"`
}

Binlog contains all the changes in a transaction, which can be used to reconstruct SQL statement, then export to other systems.

func (*Binlog) Descriptor

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

func (*Binlog) GetCommitTs

func (m *Binlog) GetCommitTs() int64

func (*Binlog) GetDdlJobId

func (m *Binlog) GetDdlJobId() int64

func (*Binlog) GetDdlQuery

func (m *Binlog) GetDdlQuery() []byte

func (*Binlog) GetPrewriteKey

func (m *Binlog) GetPrewriteKey() []byte

func (*Binlog) GetPrewriteValue

func (m *Binlog) GetPrewriteValue() []byte

func (*Binlog) GetStartTs

func (m *Binlog) GetStartTs() int64

func (*Binlog) GetTp

func (m *Binlog) GetTp() BinlogType

func (*Binlog) Marshal

func (m *Binlog) Marshal() (data []byte, err error)

func (*Binlog) MarshalTo

func (m *Binlog) MarshalTo(data []byte) (int, error)

func (*Binlog) ProtoMessage

func (*Binlog) ProtoMessage()

func (*Binlog) Reset

func (m *Binlog) Reset()

func (*Binlog) Size

func (m *Binlog) Size() (n int)

func (*Binlog) String

func (m *Binlog) String() string

func (*Binlog) Unmarshal

func (m *Binlog) Unmarshal(data []byte) error

type BinlogType

type BinlogType int32
const (
	BinlogType_Prewrite BinlogType = 0
	BinlogType_Commit   BinlogType = 1
	BinlogType_Rollback BinlogType = 2
	BinlogType_PreDDL   BinlogType = 3
	BinlogType_PostDDL  BinlogType = 4
)

func (BinlogType) Enum

func (x BinlogType) Enum() *BinlogType

func (BinlogType) EnumDescriptor

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

func (BinlogType) String

func (x BinlogType) String() string

func (*BinlogType) UnmarshalJSON

func (x *BinlogType) UnmarshalJSON(data []byte) error

type CisternClient

type CisternClient interface {
	// DumpBinlog dumps continuous binlog items in a stream from a given position
	DumpBinlog(ctx context.Context, in *DumpBinlogReq, opts ...grpc.CallOption) (Cistern_DumpBinlogClient, error)
	// DumpDDLJobs dumps all history DDL jobs before a specified commitTS
	DumpDDLJobs(ctx context.Context, in *DumpDDLJobsReq, opts ...grpc.CallOption) (*DumpDDLJobsResp, error)
	// GetLatestCommitTS returns the Last binlog commitTS of the TiDB
	GetLatestCommitTS(ctx context.Context, in *GetLatestCommitTSReq, opts ...grpc.CallOption) (*GetLatestCommitTSResp, error)
}

func NewCisternClient

func NewCisternClient(cc *grpc.ClientConn) CisternClient

type CisternServer

type CisternServer interface {
	// DumpBinlog dumps continuous binlog items in a stream from a given position
	DumpBinlog(*DumpBinlogReq, Cistern_DumpBinlogServer) error
	// DumpDDLJobs dumps all history DDL jobs before a specified commitTS
	DumpDDLJobs(context.Context, *DumpDDLJobsReq) (*DumpDDLJobsResp, error)
	// GetLatestCommitTS returns the Last binlog commitTS of the TiDB
	GetLatestCommitTS(context.Context, *GetLatestCommitTSReq) (*GetLatestCommitTSResp, error)
}

type Cistern_DumpBinlogClient

type Cistern_DumpBinlogClient interface {
	Recv() (*DumpBinlogResp, error)
	grpc.ClientStream
}

type Cistern_DumpBinlogServer

type Cistern_DumpBinlogServer interface {
	Send(*DumpBinlogResp) error
	grpc.ServerStream
}

type DumpBinlogReq

type DumpBinlogReq struct {
	// beginCommitTS speicifies the position from which begin to dump binlogs.
	// note that actually the result of dump starts from the one next to beginCommitTS
	// it should be zero in case of the first request.
	BeginCommitTS int64 `protobuf:"varint,1,opt,name=beginCommitTS,proto3" json:"beginCommitTS,omitempty"`
}

func (*DumpBinlogReq) Descriptor

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

func (*DumpBinlogReq) Marshal

func (m *DumpBinlogReq) Marshal() (data []byte, err error)

func (*DumpBinlogReq) MarshalTo

func (m *DumpBinlogReq) MarshalTo(data []byte) (int, error)

func (*DumpBinlogReq) ProtoMessage

func (*DumpBinlogReq) ProtoMessage()

func (*DumpBinlogReq) Reset

func (m *DumpBinlogReq) Reset()

func (*DumpBinlogReq) Size

func (m *DumpBinlogReq) Size() (n int)

func (*DumpBinlogReq) String

func (m *DumpBinlogReq) String() string

func (*DumpBinlogReq) Unmarshal

func (m *DumpBinlogReq) Unmarshal(data []byte) error

type DumpBinlogResp

type DumpBinlogResp struct {
	// CommitTS specifies the commitTS of binlog
	CommitTS int64 `protobuf:"varint,1,opt,name=commitTS,proto3" json:"commitTS,omitempty"`
	// payloads is bytecodes encoded from binlog item
	Payload []byte `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"`
	// ddljob is json bytes marshaled from corresponding ddljob struct if payload is a DDL type of binlog
	Ddljob []byte `protobuf:"bytes,3,opt,name=ddljob,proto3" json:"ddljob,omitempty"`
}

func (*DumpBinlogResp) Descriptor

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

func (*DumpBinlogResp) Marshal

func (m *DumpBinlogResp) Marshal() (data []byte, err error)

func (*DumpBinlogResp) MarshalTo

func (m *DumpBinlogResp) MarshalTo(data []byte) (int, error)

func (*DumpBinlogResp) ProtoMessage

func (*DumpBinlogResp) ProtoMessage()

func (*DumpBinlogResp) Reset

func (m *DumpBinlogResp) Reset()

func (*DumpBinlogResp) Size

func (m *DumpBinlogResp) Size() (n int)

func (*DumpBinlogResp) String

func (m *DumpBinlogResp) String() string

func (*DumpBinlogResp) Unmarshal

func (m *DumpBinlogResp) Unmarshal(data []byte) error

type DumpDDLJobsReq

type DumpDDLJobsReq struct {
	// beginCommitTS is the start point of drainer processing binlog, DumpDDLJobs() returns
	// all history DDL jobs before this position, then drainer will apply these DDL jobs
	// in order of job ID to restore the whole schema info at that moment.
	BeginCommitTS int64 `protobuf:"varint,1,opt,name=beginCommitTS,proto3" json:"beginCommitTS,omitempty"`
}

func (*DumpDDLJobsReq) Descriptor

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

func (*DumpDDLJobsReq) Marshal

func (m *DumpDDLJobsReq) Marshal() (data []byte, err error)

func (*DumpDDLJobsReq) MarshalTo

func (m *DumpDDLJobsReq) MarshalTo(data []byte) (int, error)

func (*DumpDDLJobsReq) ProtoMessage

func (*DumpDDLJobsReq) ProtoMessage()

func (*DumpDDLJobsReq) Reset

func (m *DumpDDLJobsReq) Reset()

func (*DumpDDLJobsReq) Size

func (m *DumpDDLJobsReq) Size() (n int)

func (*DumpDDLJobsReq) String

func (m *DumpDDLJobsReq) String() string

func (*DumpDDLJobsReq) Unmarshal

func (m *DumpDDLJobsReq) Unmarshal(data []byte) error

type DumpDDLJobsResp

type DumpDDLJobsResp struct {
	// ddljobs is an array of JSON encoded history DDL jobs
	Ddljobs [][]byte `protobuf:"bytes,1,rep,name=ddljobs" json:"ddljobs,omitempty"`
}

func (*DumpDDLJobsResp) Descriptor

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

func (*DumpDDLJobsResp) Marshal

func (m *DumpDDLJobsResp) Marshal() (data []byte, err error)

func (*DumpDDLJobsResp) MarshalTo

func (m *DumpDDLJobsResp) MarshalTo(data []byte) (int, error)

func (*DumpDDLJobsResp) ProtoMessage

func (*DumpDDLJobsResp) ProtoMessage()

func (*DumpDDLJobsResp) Reset

func (m *DumpDDLJobsResp) Reset()

func (*DumpDDLJobsResp) Size

func (m *DumpDDLJobsResp) Size() (n int)

func (*DumpDDLJobsResp) String

func (m *DumpDDLJobsResp) String() string

func (*DumpDDLJobsResp) Unmarshal

func (m *DumpDDLJobsResp) Unmarshal(data []byte) error

type Entity

type Entity struct {
	// The position of the binlog entity.
	Pos Pos `protobuf:"bytes,1,opt,name=pos" json:"pos"`
	// The payload of binlog entity.
	Payload []byte `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"`
}

func (*Entity) Descriptor

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

func (*Entity) GetPos

func (m *Entity) GetPos() Pos

func (*Entity) Marshal

func (m *Entity) Marshal() (data []byte, err error)

func (*Entity) MarshalTo

func (m *Entity) MarshalTo(data []byte) (int, error)

func (*Entity) ProtoMessage

func (*Entity) ProtoMessage()

func (*Entity) Reset

func (m *Entity) Reset()

func (*Entity) Size

func (m *Entity) Size() (n int)

func (*Entity) String

func (m *Entity) String() string

func (*Entity) Unmarshal

func (m *Entity) Unmarshal(data []byte) error

type GetLatestCommitTSReq

type GetLatestCommitTSReq struct {
}

func (*GetLatestCommitTSReq) Descriptor

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

func (*GetLatestCommitTSReq) Marshal

func (m *GetLatestCommitTSReq) Marshal() (data []byte, err error)

func (*GetLatestCommitTSReq) MarshalTo

func (m *GetLatestCommitTSReq) MarshalTo(data []byte) (int, error)

func (*GetLatestCommitTSReq) ProtoMessage

func (*GetLatestCommitTSReq) ProtoMessage()

func (*GetLatestCommitTSReq) Reset

func (m *GetLatestCommitTSReq) Reset()

func (*GetLatestCommitTSReq) Size

func (m *GetLatestCommitTSReq) Size() (n int)

func (*GetLatestCommitTSReq) String

func (m *GetLatestCommitTSReq) String() string

func (*GetLatestCommitTSReq) Unmarshal

func (m *GetLatestCommitTSReq) Unmarshal(data []byte) error

type GetLatestCommitTSResp

type GetLatestCommitTSResp struct {
	// commitTS specifies the Last binlog commitTS of the TiDB
	CommitTS int64 `protobuf:"varint,1,opt,name=commitTS,proto3" json:"commitTS,omitempty"`
	// isSynced specifies whether the all binlogs are consumed from pump
	IsSynced bool `protobuf:"varint,2,opt,name=isSynced,proto3" json:"isSynced,omitempty"`
}

func (*GetLatestCommitTSResp) Descriptor

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

func (*GetLatestCommitTSResp) Marshal

func (m *GetLatestCommitTSResp) Marshal() (data []byte, err error)

func (*GetLatestCommitTSResp) MarshalTo

func (m *GetLatestCommitTSResp) MarshalTo(data []byte) (int, error)

func (*GetLatestCommitTSResp) ProtoMessage

func (*GetLatestCommitTSResp) ProtoMessage()

func (*GetLatestCommitTSResp) Reset

func (m *GetLatestCommitTSResp) Reset()

func (*GetLatestCommitTSResp) Size

func (m *GetLatestCommitTSResp) Size() (n int)

func (*GetLatestCommitTSResp) String

func (m *GetLatestCommitTSResp) String() string

func (*GetLatestCommitTSResp) Unmarshal

func (m *GetLatestCommitTSResp) Unmarshal(data []byte) error

type MutationType

type MutationType int32
const (
	MutationType_Insert    MutationType = 0
	MutationType_Update    MutationType = 1
	MutationType_DeleteID  MutationType = 2
	MutationType_DeletePK  MutationType = 3
	MutationType_DeleteRow MutationType = 4
)

func (MutationType) Enum

func (x MutationType) Enum() *MutationType

func (MutationType) EnumDescriptor

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

func (MutationType) String

func (x MutationType) String() string

func (*MutationType) UnmarshalJSON

func (x *MutationType) UnmarshalJSON(data []byte) error

type Pos

type Pos struct {
	// The suffix of binlog file, like .000001 .000002
	Suffix uint64 `protobuf:"varint,1,opt,name=suffix,proto3" json:"suffix,omitempty"`
	// The binlog offset in a file.
	Offset int64 `protobuf:"varint,2,opt,name=offset,proto3" json:"offset,omitempty"`
}

Binlogs are stored in a number of sequential files in a directory. The Pos describes the position of a binlog.

func (*Pos) Descriptor

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

func (*Pos) Marshal

func (m *Pos) Marshal() (data []byte, err error)

func (*Pos) MarshalTo

func (m *Pos) MarshalTo(data []byte) (int, error)

func (*Pos) ProtoMessage

func (*Pos) ProtoMessage()

func (*Pos) Reset

func (m *Pos) Reset()

func (*Pos) Size

func (m *Pos) Size() (n int)

func (*Pos) String

func (m *Pos) String() string

func (*Pos) Unmarshal

func (m *Pos) Unmarshal(data []byte) error

type PrewriteValue

type PrewriteValue struct {
	SchemaVersion    int64           `protobuf:"varint,1,opt,name=schema_version,json=schemaVersion" json:"schema_version"`
	Mutations        []TableMutation `protobuf:"bytes,2,rep,name=mutations" json:"mutations"`
	XXX_unrecognized []byte          `json:"-"`
}

func (*PrewriteValue) Descriptor

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

func (*PrewriteValue) GetMutations

func (m *PrewriteValue) GetMutations() []TableMutation

func (*PrewriteValue) GetSchemaVersion

func (m *PrewriteValue) GetSchemaVersion() int64

func (*PrewriteValue) Marshal

func (m *PrewriteValue) Marshal() (data []byte, err error)

func (*PrewriteValue) MarshalTo

func (m *PrewriteValue) MarshalTo(data []byte) (int, error)

func (*PrewriteValue) ProtoMessage

func (*PrewriteValue) ProtoMessage()

func (*PrewriteValue) Reset

func (m *PrewriteValue) Reset()

func (*PrewriteValue) Size

func (m *PrewriteValue) Size() (n int)

func (*PrewriteValue) String

func (m *PrewriteValue) String() string

func (*PrewriteValue) Unmarshal

func (m *PrewriteValue) Unmarshal(data []byte) error

type PullBinlogReq

type PullBinlogReq struct {
	// Specifies which clusterID of binlog to pull.
	ClusterID uint64 `protobuf:"varint,1,opt,name=clusterID,proto3" json:"clusterID,omitempty"`
	// The position from which the binlog will be sent.
	StartFrom Pos `protobuf:"bytes,2,opt,name=startFrom" json:"startFrom"`
	// The max number of binlog in a batch to pull.
	Batch int32 `protobuf:"varint,3,opt,name=batch,proto3" json:"batch,omitempty"`
}

func (*PullBinlogReq) Descriptor

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

func (*PullBinlogReq) GetStartFrom

func (m *PullBinlogReq) GetStartFrom() Pos

func (*PullBinlogReq) Marshal

func (m *PullBinlogReq) Marshal() (data []byte, err error)

func (*PullBinlogReq) MarshalTo

func (m *PullBinlogReq) MarshalTo(data []byte) (int, error)

func (*PullBinlogReq) ProtoMessage

func (*PullBinlogReq) ProtoMessage()

func (*PullBinlogReq) Reset

func (m *PullBinlogReq) Reset()

func (*PullBinlogReq) Size

func (m *PullBinlogReq) Size() (n int)

func (*PullBinlogReq) String

func (m *PullBinlogReq) String() string

func (*PullBinlogReq) Unmarshal

func (m *PullBinlogReq) Unmarshal(data []byte) error

type PullBinlogResp

type PullBinlogResp struct {
	// An empty errmsg means that the successful acquisition of binlogs.
	Errmsg string `protobuf:"bytes,1,opt,name=errmsg,proto3" json:"errmsg,omitempty"`
	// The binlog entities pulled in a batch
	Entities []Entity `protobuf:"bytes,2,rep,name=entities" json:"entities"`
}

func (*PullBinlogResp) Descriptor

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

func (*PullBinlogResp) GetEntities

func (m *PullBinlogResp) GetEntities() []Entity

func (*PullBinlogResp) Marshal

func (m *PullBinlogResp) Marshal() (data []byte, err error)

func (*PullBinlogResp) MarshalTo

func (m *PullBinlogResp) MarshalTo(data []byte) (int, error)

func (*PullBinlogResp) ProtoMessage

func (*PullBinlogResp) ProtoMessage()

func (*PullBinlogResp) Reset

func (m *PullBinlogResp) Reset()

func (*PullBinlogResp) Size

func (m *PullBinlogResp) Size() (n int)

func (*PullBinlogResp) String

func (m *PullBinlogResp) String() string

func (*PullBinlogResp) Unmarshal

func (m *PullBinlogResp) Unmarshal(data []byte) error

type PumpClient

type PumpClient interface {
	// Writes a binlog to the local file on the pump machine.
	// A response with an empty errmsg is returned if the binlog is written successfully.
	WriteBinlog(ctx context.Context, in *WriteBinlogReq, opts ...grpc.CallOption) (*WriteBinlogResp, error)
	// Obtains a batch of binlog from a given location.
	PullBinlogs(ctx context.Context, in *PullBinlogReq, opts ...grpc.CallOption) (*PullBinlogResp, error)
}

func NewPumpClient

func NewPumpClient(cc *grpc.ClientConn) PumpClient

type PumpServer

type PumpServer interface {
	// Writes a binlog to the local file on the pump machine.
	// A response with an empty errmsg is returned if the binlog is written successfully.
	WriteBinlog(context.Context, *WriteBinlogReq) (*WriteBinlogResp, error)
	// Obtains a batch of binlog from a given location.
	PullBinlogs(context.Context, *PullBinlogReq) (*PullBinlogResp, error)
}

type TableMutation

type TableMutation struct {
	TableId int64 `protobuf:"varint,1,opt,name=table_id,json=tableId" json:"table_id"`
	// For inserted rows and updated rows, we save all column values of the row.
	InsertedRows [][]byte `protobuf:"bytes,2,rep,name=inserted_rows,json=insertedRows" json:"inserted_rows,omitempty"`
	UpdatedRows  [][]byte `protobuf:"bytes,3,rep,name=updated_rows,json=updatedRows" json:"updated_rows,omitempty"`
	// If the table PK is handle, we can only save the id of the deleted row.
	DeletedIds []int64 `protobuf:"varint,4,rep,name=deleted_ids,json=deletedIds" json:"deleted_ids,omitempty"`
	// If the table has PK but PK is not handle, we save the PK of the deleted row.
	DeletedPks [][]byte `protobuf:"bytes,5,rep,name=deleted_pks,json=deletedPks" json:"deleted_pks,omitempty"`
	// If the table doesn't have PK, we save the row value of the deleted row.
	DeletedRows [][]byte `protobuf:"bytes,6,rep,name=deleted_rows,json=deletedRows" json:"deleted_rows,omitempty"`
	// Used to apply table mutations in original sequence.
	Sequence         []MutationType `protobuf:"varint,7,rep,name=sequence,enum=binlog.MutationType" json:"sequence,omitempty"`
	XXX_unrecognized []byte         `json:"-"`
}

TableMutation contains mutations in a table.

func (*TableMutation) Descriptor

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

func (*TableMutation) GetDeletedIds

func (m *TableMutation) GetDeletedIds() []int64

func (*TableMutation) GetDeletedPks

func (m *TableMutation) GetDeletedPks() [][]byte

func (*TableMutation) GetDeletedRows

func (m *TableMutation) GetDeletedRows() [][]byte

func (*TableMutation) GetInsertedRows

func (m *TableMutation) GetInsertedRows() [][]byte

func (*TableMutation) GetSequence

func (m *TableMutation) GetSequence() []MutationType

func (*TableMutation) GetTableId

func (m *TableMutation) GetTableId() int64

func (*TableMutation) GetUpdatedRows

func (m *TableMutation) GetUpdatedRows() [][]byte

func (*TableMutation) Marshal

func (m *TableMutation) Marshal() (data []byte, err error)

func (*TableMutation) MarshalTo

func (m *TableMutation) MarshalTo(data []byte) (int, error)

func (*TableMutation) ProtoMessage

func (*TableMutation) ProtoMessage()

func (*TableMutation) Reset

func (m *TableMutation) Reset()

func (*TableMutation) Size

func (m *TableMutation) Size() (n int)

func (*TableMutation) String

func (m *TableMutation) String() string

func (*TableMutation) Unmarshal

func (m *TableMutation) Unmarshal(data []byte) error

type WriteBinlogReq

type WriteBinlogReq struct {
	// The identifier of tidb-cluster, which is given at tidb startup.
	// Must specify the clusterID for each binlog to write.
	ClusterID uint64 `protobuf:"varint,1,opt,name=clusterID,proto3" json:"clusterID,omitempty"`
	// Payload bytes can be decoded back to binlog struct by the protobuf.
	Payload []byte `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"`
}

func (*WriteBinlogReq) Descriptor

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

func (*WriteBinlogReq) Marshal

func (m *WriteBinlogReq) Marshal() (data []byte, err error)

func (*WriteBinlogReq) MarshalTo

func (m *WriteBinlogReq) MarshalTo(data []byte) (int, error)

func (*WriteBinlogReq) ProtoMessage

func (*WriteBinlogReq) ProtoMessage()

func (*WriteBinlogReq) Reset

func (m *WriteBinlogReq) Reset()

func (*WriteBinlogReq) Size

func (m *WriteBinlogReq) Size() (n int)

func (*WriteBinlogReq) String

func (m *WriteBinlogReq) String() string

func (*WriteBinlogReq) Unmarshal

func (m *WriteBinlogReq) Unmarshal(data []byte) error

type WriteBinlogResp

type WriteBinlogResp struct {
	// An empty errmsg returned means a successful write.
	// Otherwise return the error description.
	Errmsg string `protobuf:"bytes,1,opt,name=errmsg,proto3" json:"errmsg,omitempty"`
}

func (*WriteBinlogResp) Descriptor

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

func (*WriteBinlogResp) Marshal

func (m *WriteBinlogResp) Marshal() (data []byte, err error)

func (*WriteBinlogResp) MarshalTo

func (m *WriteBinlogResp) MarshalTo(data []byte) (int, error)

func (*WriteBinlogResp) ProtoMessage

func (*WriteBinlogResp) ProtoMessage()

func (*WriteBinlogResp) Reset

func (m *WriteBinlogResp) Reset()

func (*WriteBinlogResp) Size

func (m *WriteBinlogResp) Size() (n int)

func (*WriteBinlogResp) String

func (m *WriteBinlogResp) String() string

func (*WriteBinlogResp) Unmarshal

func (m *WriteBinlogResp) Unmarshal(data []byte) error

Jump to

Keyboard shortcuts

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