All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ikv.tikv-client-java.3.0.0.source-code.cdcpb.proto Maven / Gradle / Ivy

The newest version!
syntax = "proto3";
package cdcpb;

import "raft_cmdpb.proto";
import "metapb.proto";
import "errorpb.proto";

import "gogoproto/gogo.proto";
import "rustproto.proto";

option(gogoproto.sizer_all) = true;
option(gogoproto.marshaler_all) = true;
option(gogoproto.unmarshaler_all) = true;
option(rustproto.lite_runtime_all) = true;

option java_package = "org.tikv.kvproto";

message Header {
    uint64 cluster_id = 1;
}

message Event {
    enum LogType {
        UNKNOWN = 0;
        PREWRITE = 1;
        COMMIT = 2;
        ROLLBACK = 3;
        COMMITTED = 4;
        INITIALIZED = 5;
    }

    message Row {
        uint64 start_ts = 1;
        uint64 commit_ts = 2;
        LogType type = 3;

        enum OpType {
            UNKNOWN = 0;
            PUT = 1;
            DELETE = 2;
        }
        OpType op_type = 4;
        bytes key = 5;
        bytes value = 6;
    }

    message Entries {
        repeated Row entries = 1;
    }

    message Admin {
        raft_cmdpb.AdminRequest admin_request = 1;
        raft_cmdpb.AdminResponse admin_response = 2;
    }

    message Error {
        errorpb.NotLeader not_leader = 1;
        errorpb.RegionNotFound region_not_found = 2;
        errorpb.EpochNotMatch epoch_not_match = 3;
    }

    uint64 region_id = 1;
    uint64 index = 2;
    oneof event {
        Entries entries = 3;
        Admin admin = 4;
        Error error = 5;
        uint64 resolved_ts = 6;
        // More region level events ...
    }
}

message ChangeDataEvent {
    repeated Event events = 1;
    // More store level events ...
}

message ChangeDataRequest {
    Header header = 1;
    uint64 region_id = 2;
    metapb.RegionEpoch region_epoch = 3;

    uint64 checkpoint_ts = 4;
    bytes start_key = 5;
    bytes end_key = 6;
}

service ChangeData {
    rpc EventFeed(ChangeDataRequest) returns(stream ChangeDataEvent);
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy