github.com/pingcap/badger@v1.5.1-0.20230103063557-828f39b09b6d/protos/manifest.proto (about)

     1  /*
     2   * Copyright (C) 2017 Dgraph Labs, Inc. and Contributors
     3   *
     4   * Licensed under the Apache License, Version 2.0 (the "License");
     5   * you may not use this file except in compliance with the License.
     6   * You may obtain a copy of the License at
     7   *
     8   *    http://www.apache.org/licenses/LICENSE-2.0
     9   *
    10   * Unless required by applicable law or agreed to in writing, software
    11   * distributed under the License is distributed on an "AS IS" BASIS,
    12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    13   * See the License for the specific language governing permissions and
    14   * limitations under the License.
    15   */
    16  
    17  // Use protos/gen.sh to generate .pb.go files.
    18  syntax = "proto3";
    19  
    20  package protos;
    21  
    22  message ManifestChangeSet {
    23    // A set of changes that are applied atomically.
    24    repeated ManifestChange changes = 1;
    25    HeadInfo head = 2;
    26  }
    27  
    28  message HeadInfo {
    29    uint64 version   = 1;
    30    uint32 logID     = 2;
    31    uint32 logOffset = 3;
    32  }
    33  
    34  message ManifestChange {
    35    uint64 Id = 1;            // Table ID.
    36    enum Operation {
    37      CREATE = 0;
    38      DELETE = 1;
    39      MOVE_DOWN = 2;
    40    }
    41    Operation Op   = 2;
    42    uint32 Level   = 3;       // Only used for CREATE.
    43  }