binlog

package
v1.1.0-alpha Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2017 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
NotifyReq
NotifyResp

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)
	// Notify notifies all living cisterns that a new pump is coming
	// the living cisterns can be queried from pd
	Notify(ctx context.Context, in *NotifyReq, opts ...grpc.CallOption) (*NotifyResp, 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)
	// Notify notifies all living cisterns that a new pump is coming
	// the living cisterns can be queried from pd
	Notify(context.Context, *NotifyReq) (*NotifyResp, 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) GetBeginCommitTS ¶

func (m *DumpBinlogReq) GetBeginCommitTS() int64

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) GetCommitTS ¶

func (m *DumpBinlogResp) GetCommitTS() int64

func (*DumpBinlogResp) GetDdljob ¶

func (m *DumpBinlogResp) GetDdljob() []byte

func (*DumpBinlogResp) GetPayload ¶

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

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) GetBeginCommitTS ¶

func (m *DumpDDLJobsReq) GetBeginCommitTS() int64

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) GetDdljobs ¶

func (m *DumpDDLJobsResp) GetDdljobs() [][]byte

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) GetPayload ¶

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

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 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 NotifyReq ¶

type NotifyReq struct {
}

func (*NotifyReq) Descriptor ¶

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

func (*NotifyReq) Marshal ¶

func (m *NotifyReq) Marshal() (dAtA []byte, err error)

func (*NotifyReq) MarshalTo ¶

func (m *NotifyReq) MarshalTo(dAtA []byte) (int, error)

func (*NotifyReq) ProtoMessage ¶

func (*NotifyReq) ProtoMessage()

func (*NotifyReq) Reset ¶

func (m *NotifyReq) Reset()

func (*NotifyReq) Size ¶

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

func (*NotifyReq) String ¶

func (m *NotifyReq) String() string

func (*NotifyReq) Unmarshal ¶

func (m *NotifyReq) Unmarshal(dAtA []byte) error

type NotifyResp ¶

type NotifyResp struct {
}

func (*NotifyResp) Descriptor ¶

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

func (*NotifyResp) Marshal ¶

func (m *NotifyResp) Marshal() (dAtA []byte, err error)

func (*NotifyResp) MarshalTo ¶

func (m *NotifyResp) MarshalTo(dAtA []byte) (int, error)

func (*NotifyResp) ProtoMessage ¶

func (*NotifyResp) ProtoMessage()

func (*NotifyResp) Reset ¶

func (m *NotifyResp) Reset()

func (*NotifyResp) Size ¶

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

func (*NotifyResp) String ¶

func (m *NotifyResp) String() string

func (*NotifyResp) Unmarshal ¶

func (m *NotifyResp) Unmarshal(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) GetOffset ¶

func (m *Pos) GetOffset() int64

func (*Pos) GetSuffix ¶

func (m *Pos) GetSuffix() uint64

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"`
}

func (*PullBinlogReq) Descriptor ¶

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

func (*PullBinlogReq) GetClusterID ¶

func (m *PullBinlogReq) GetClusterID() uint64

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 {
	// The binlog entity that send in a stream
	Entity Entity `protobuf:"bytes,1,opt,name=entity" json:"entity"`
}

func (*PullBinlogResp) Descriptor ¶

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

func (*PullBinlogResp) GetEntity ¶

func (m *PullBinlogResp) GetEntity() 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)
	// Sends binlog stream from a given location.
	PullBinlogs(ctx context.Context, in *PullBinlogReq, opts ...grpc.CallOption) (Pump_PullBinlogsClient, 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)
	// Sends binlog stream from a given location.
	PullBinlogs(*PullBinlogReq, Pump_PullBinlogsServer) error
}

type Pump_PullBinlogsClient ¶

type Pump_PullBinlogsClient interface {
	Recv() (*PullBinlogResp, error)
	grpc.ClientStream
}

type Pump_PullBinlogsServer ¶

type Pump_PullBinlogsServer interface {
	Send(*PullBinlogResp) error
	grpc.ServerStream
}

type TableMutation ¶

type TableMutation struct {
	TableId int64 `protobuf:"varint,1,opt,name=table_id,json=tableId" json:"table_id"`
	// The inserted row contains all column values.
	InsertedRows [][]byte `protobuf:"bytes,2,rep,name=inserted_rows,json=insertedRows" json:"inserted_rows,omitempty"`
	// The updated row contains old values and new values of the row.
	UpdatedRows [][]byte `protobuf:"bytes,3,rep,name=updated_rows,json=updatedRows" json:"updated_rows,omitempty"`
	// Obsolete field.
	DeletedIds []int64 `protobuf:"varint,4,rep,name=deleted_ids,json=deletedIds" json:"deleted_ids,omitempty"`
	// Obsolete field.
	DeletedPks [][]byte `protobuf:"bytes,5,rep,name=deleted_pks,json=deletedPks" json:"deleted_pks,omitempty"`
	// 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) GetClusterID ¶

func (m *WriteBinlogReq) GetClusterID() uint64

func (*WriteBinlogReq) GetPayload ¶

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

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) GetErrmsg ¶

func (m *WriteBinlogResp) GetErrmsg() string

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