tipb: github.com/pingcap/tipb/go-binlog Index | Files

package binlog

import "github.com/pingcap/tipb/go-binlog"

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
Meta
Entity

Index

Package Files

binlog.pb.go cistern.pb.go pump.pb.go

Variables

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

func RegisterCisternServer Uses

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

func RegisterPumpServer Uses

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

type Binlog Uses

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.
    DdlQuery []byte `protobuf:"bytes,6,opt,name=ddl_query,json=ddlQuery" json:"ddl_query,omitempty"`
    // ddl_job_id is used for DDL Binlog.
    // If ddl_job_id is setted, this is a DDL Binlog and ddl_query contains the DDL query, we can query the informations about this job from TiKV.
    DdlJobId int64 `protobuf:"varint,7,opt,name=ddl_job_id,json=ddlJobId" json:"ddl_job_id"`
    // ddl_schema_state is used for DDL Binlog.
    DdlSchemaState   int32  `protobuf:"varint,8,opt,name=ddl_schema_state,json=ddlSchemaState" json:"ddl_schema_state"`
    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 Uses

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

func (*Binlog) GetCommitTs Uses

func (m *Binlog) GetCommitTs() int64

func (*Binlog) GetDdlJobId Uses

func (m *Binlog) GetDdlJobId() int64

func (*Binlog) GetDdlQuery Uses

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

func (*Binlog) GetDdlSchemaState Uses

func (m *Binlog) GetDdlSchemaState() int32

func (*Binlog) GetPrewriteKey Uses

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

func (*Binlog) GetPrewriteValue Uses

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

func (*Binlog) GetStartTs Uses

func (m *Binlog) GetStartTs() int64

func (*Binlog) GetTp Uses

func (m *Binlog) GetTp() BinlogType

func (*Binlog) Marshal Uses

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

func (*Binlog) MarshalTo Uses

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

func (*Binlog) ProtoMessage Uses

func (*Binlog) ProtoMessage()

func (*Binlog) Reset Uses

func (m *Binlog) Reset()

func (*Binlog) Size Uses

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

func (*Binlog) String Uses

func (m *Binlog) String() string

func (*Binlog) Unmarshal Uses

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

type BinlogType Uses

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 Uses

func (x BinlogType) Enum() *BinlogType

func (BinlogType) EnumDescriptor Uses

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

func (BinlogType) String Uses

func (x BinlogType) String() string

func (*BinlogType) UnmarshalJSON Uses

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

type CisternClient Uses

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 Uses

func NewCisternClient(cc *grpc.ClientConn) CisternClient

type CisternServer Uses

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 Uses

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

type Cistern_DumpBinlogServer Uses

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

type DumpBinlogReq Uses

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 Uses

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

func (*DumpBinlogReq) GetBeginCommitTS Uses

func (m *DumpBinlogReq) GetBeginCommitTS() int64

func (*DumpBinlogReq) Marshal Uses

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

func (*DumpBinlogReq) MarshalTo Uses

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

func (*DumpBinlogReq) ProtoMessage Uses

func (*DumpBinlogReq) ProtoMessage()

func (*DumpBinlogReq) Reset Uses

func (m *DumpBinlogReq) Reset()

func (*DumpBinlogReq) Size Uses

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

func (*DumpBinlogReq) String Uses

func (m *DumpBinlogReq) String() string

func (*DumpBinlogReq) Unmarshal Uses

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

type DumpBinlogResp Uses

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 Uses

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

func (*DumpBinlogResp) GetCommitTS Uses

func (m *DumpBinlogResp) GetCommitTS() int64

func (*DumpBinlogResp) GetDdljob Uses

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

func (*DumpBinlogResp) GetPayload Uses

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

func (*DumpBinlogResp) Marshal Uses

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

func (*DumpBinlogResp) MarshalTo Uses

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

func (*DumpBinlogResp) ProtoMessage Uses

func (*DumpBinlogResp) ProtoMessage()

func (*DumpBinlogResp) Reset Uses

func (m *DumpBinlogResp) Reset()

func (*DumpBinlogResp) Size Uses

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

func (*DumpBinlogResp) String Uses

func (m *DumpBinlogResp) String() string

func (*DumpBinlogResp) Unmarshal Uses

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

type DumpDDLJobsReq Uses

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 Uses

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

func (*DumpDDLJobsReq) GetBeginCommitTS Uses

func (m *DumpDDLJobsReq) GetBeginCommitTS() int64

func (*DumpDDLJobsReq) Marshal Uses

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

func (*DumpDDLJobsReq) MarshalTo Uses

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

func (*DumpDDLJobsReq) ProtoMessage Uses

func (*DumpDDLJobsReq) ProtoMessage()

func (*DumpDDLJobsReq) Reset Uses

func (m *DumpDDLJobsReq) Reset()

func (*DumpDDLJobsReq) Size Uses

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

func (*DumpDDLJobsReq) String Uses

func (m *DumpDDLJobsReq) String() string

func (*DumpDDLJobsReq) Unmarshal Uses

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

type DumpDDLJobsResp Uses

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 Uses

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

func (*DumpDDLJobsResp) GetDdljobs Uses

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

func (*DumpDDLJobsResp) Marshal Uses

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

func (*DumpDDLJobsResp) MarshalTo Uses

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

func (*DumpDDLJobsResp) ProtoMessage Uses

func (*DumpDDLJobsResp) ProtoMessage()

func (*DumpDDLJobsResp) Reset Uses

func (m *DumpDDLJobsResp) Reset()

func (*DumpDDLJobsResp) Size Uses

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

func (*DumpDDLJobsResp) String Uses

func (m *DumpDDLJobsResp) String() string

func (*DumpDDLJobsResp) Unmarshal Uses

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

type Entity Uses

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"`
    // checksum of binlog payload.
    Checksum []byte `protobuf:"bytes,3,opt,name=checksum,proto3" json:"checksum,omitempty"`
    // The meta information of the binlog entity.
    Meta Meta `protobuf:"bytes,4,opt,name=meta" json:"meta"`
}

func (*Entity) Descriptor Uses

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

func (*Entity) GetChecksum Uses

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

func (*Entity) GetMeta Uses

func (m *Entity) GetMeta() Meta

func (*Entity) GetPayload Uses

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

func (*Entity) GetPos Uses

func (m *Entity) GetPos() Pos

func (*Entity) Marshal Uses

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

func (*Entity) MarshalTo Uses

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

func (*Entity) ProtoMessage Uses

func (*Entity) ProtoMessage()

func (*Entity) Reset Uses

func (m *Entity) Reset()

func (*Entity) Size Uses

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

func (*Entity) String Uses

func (m *Entity) String() string

func (*Entity) Unmarshal Uses

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

type Meta Uses

type Meta struct {
    // The binlog's start ts, used in Prewrite, Commit and Rollback type binlog.
    StartTs int64 `protobuf:"varint,1,opt,name=startTs,proto3" json:"startTs,omitempty"`
    // The binlog's commit ts, used only in Commit type binlog.
    CommitTs int64 `protobuf:"varint,2,opt,name=commitTs,proto3" json:"commitTs,omitempty"`
}

Meta saves the binlog's meta information.

func (*Meta) Descriptor Uses

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

func (*Meta) GetCommitTs Uses

func (m *Meta) GetCommitTs() int64

func (*Meta) GetStartTs Uses

func (m *Meta) GetStartTs() int64

func (*Meta) Marshal Uses

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

func (*Meta) MarshalTo Uses

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

func (*Meta) ProtoMessage Uses

func (*Meta) ProtoMessage()

func (*Meta) Reset Uses

func (m *Meta) Reset()

func (*Meta) Size Uses

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

func (*Meta) String Uses

func (m *Meta) String() string

func (*Meta) Unmarshal Uses

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

type MutationType Uses

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 Uses

func (x MutationType) Enum() *MutationType

func (MutationType) EnumDescriptor Uses

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

func (MutationType) String Uses

func (x MutationType) String() string

func (*MutationType) UnmarshalJSON Uses

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

type NotifyReq Uses

type NotifyReq struct {
}

func (*NotifyReq) Descriptor Uses

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

func (*NotifyReq) Marshal Uses

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

func (*NotifyReq) MarshalTo Uses

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

func (*NotifyReq) ProtoMessage Uses

func (*NotifyReq) ProtoMessage()

func (*NotifyReq) Reset Uses

func (m *NotifyReq) Reset()

func (*NotifyReq) Size Uses

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

func (*NotifyReq) String Uses

func (m *NotifyReq) String() string

func (*NotifyReq) Unmarshal Uses

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

type NotifyResp Uses

type NotifyResp struct {
}

func (*NotifyResp) Descriptor Uses

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

func (*NotifyResp) Marshal Uses

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

func (*NotifyResp) MarshalTo Uses

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

func (*NotifyResp) ProtoMessage Uses

func (*NotifyResp) ProtoMessage()

func (*NotifyResp) Reset Uses

func (m *NotifyResp) Reset()

func (*NotifyResp) Size Uses

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

func (*NotifyResp) String Uses

func (m *NotifyResp) String() string

func (*NotifyResp) Unmarshal Uses

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

type Pos Uses

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 Uses

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

func (*Pos) GetOffset Uses

func (m *Pos) GetOffset() int64

func (*Pos) GetSuffix Uses

func (m *Pos) GetSuffix() uint64

func (*Pos) Marshal Uses

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

func (*Pos) MarshalTo Uses

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

func (*Pos) ProtoMessage Uses

func (*Pos) ProtoMessage()

func (*Pos) Reset Uses

func (m *Pos) Reset()

func (*Pos) Size Uses

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

func (*Pos) String Uses

func (m *Pos) String() string

func (*Pos) Unmarshal Uses

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

type PrewriteValue Uses

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 Uses

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

func (*PrewriteValue) GetMutations Uses

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

func (*PrewriteValue) GetSchemaVersion Uses

func (m *PrewriteValue) GetSchemaVersion() int64

func (*PrewriteValue) Marshal Uses

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

func (*PrewriteValue) MarshalTo Uses

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

func (*PrewriteValue) ProtoMessage Uses

func (*PrewriteValue) ProtoMessage()

func (*PrewriteValue) Reset Uses

func (m *PrewriteValue) Reset()

func (*PrewriteValue) Size Uses

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

func (*PrewriteValue) String Uses

func (m *PrewriteValue) String() string

func (*PrewriteValue) Unmarshal Uses

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

type PullBinlogReq Uses

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 Uses

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

func (*PullBinlogReq) GetClusterID Uses

func (m *PullBinlogReq) GetClusterID() uint64

func (*PullBinlogReq) GetStartFrom Uses

func (m *PullBinlogReq) GetStartFrom() Pos

func (*PullBinlogReq) Marshal Uses

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

func (*PullBinlogReq) MarshalTo Uses

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

func (*PullBinlogReq) ProtoMessage Uses

func (*PullBinlogReq) ProtoMessage()

func (*PullBinlogReq) Reset Uses

func (m *PullBinlogReq) Reset()

func (*PullBinlogReq) Size Uses

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

func (*PullBinlogReq) String Uses

func (m *PullBinlogReq) String() string

func (*PullBinlogReq) Unmarshal Uses

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

type PullBinlogResp Uses

type PullBinlogResp struct {
    // The binlog entity that send in a stream
    Entity Entity `protobuf:"bytes,1,opt,name=entity" json:"entity"`
}

func (*PullBinlogResp) Descriptor Uses

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

func (*PullBinlogResp) GetEntity Uses

func (m *PullBinlogResp) GetEntity() Entity

func (*PullBinlogResp) Marshal Uses

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

func (*PullBinlogResp) MarshalTo Uses

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

func (*PullBinlogResp) ProtoMessage Uses

func (*PullBinlogResp) ProtoMessage()

func (*PullBinlogResp) Reset Uses

func (m *PullBinlogResp) Reset()

func (*PullBinlogResp) Size Uses

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

func (*PullBinlogResp) String Uses

func (m *PullBinlogResp) String() string

func (*PullBinlogResp) Unmarshal Uses

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

type PumpClient Uses

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 Uses

func NewPumpClient(cc *grpc.ClientConn) PumpClient

type PumpServer Uses

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 Uses

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

type Pump_PullBinlogsServer Uses

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

type TableMutation Uses

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 Uses

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

func (*TableMutation) GetDeletedIds Uses

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

func (*TableMutation) GetDeletedPks Uses

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

func (*TableMutation) GetDeletedRows Uses

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

func (*TableMutation) GetInsertedRows Uses

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

func (*TableMutation) GetSequence Uses

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

func (*TableMutation) GetTableId Uses

func (m *TableMutation) GetTableId() int64

func (*TableMutation) GetUpdatedRows Uses

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

func (*TableMutation) Marshal Uses

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

func (*TableMutation) MarshalTo Uses

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

func (*TableMutation) ProtoMessage Uses

func (*TableMutation) ProtoMessage()

func (*TableMutation) Reset Uses

func (m *TableMutation) Reset()

func (*TableMutation) Size Uses

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

func (*TableMutation) String Uses

func (m *TableMutation) String() string

func (*TableMutation) Unmarshal Uses

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

type WriteBinlogReq Uses

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 Uses

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

func (*WriteBinlogReq) GetClusterID Uses

func (m *WriteBinlogReq) GetClusterID() uint64

func (*WriteBinlogReq) GetPayload Uses

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

func (*WriteBinlogReq) Marshal Uses

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

func (*WriteBinlogReq) MarshalTo Uses

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

func (*WriteBinlogReq) ProtoMessage Uses

func (*WriteBinlogReq) ProtoMessage()

func (*WriteBinlogReq) Reset Uses

func (m *WriteBinlogReq) Reset()

func (*WriteBinlogReq) Size Uses

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

func (*WriteBinlogReq) String Uses

func (m *WriteBinlogReq) String() string

func (*WriteBinlogReq) Unmarshal Uses

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

type WriteBinlogResp Uses

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 Uses

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

func (*WriteBinlogResp) GetErrmsg Uses

func (m *WriteBinlogResp) GetErrmsg() string

func (*WriteBinlogResp) Marshal Uses

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

func (*WriteBinlogResp) MarshalTo Uses

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

func (*WriteBinlogResp) ProtoMessage Uses

func (*WriteBinlogResp) ProtoMessage()

func (*WriteBinlogResp) Reset Uses

func (m *WriteBinlogResp) Reset()

func (*WriteBinlogResp) Size Uses

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

func (*WriteBinlogResp) String Uses

func (m *WriteBinlogResp) String() string

func (*WriteBinlogResp) Unmarshal Uses

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

Package binlog imports 6 packages (graph) and is imported by 185 packages. Updated 2019-12-05. Refresh now. Tools for package owners.