kythe.io@v0.0.68-0.20240422202219-7225dbc01741/kythe/proto/storage_service.proto (about)

     1  /*
     2   * Copyright 2016 The Kythe Authors. All rights reserved.
     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  syntax = "proto3";
    18  
    19  package kythe.proto;
    20  
    21  option go_package = "kythe.io/kythe/proto/storage_service_go_proto";
    22  option java_package = "com.google.devtools.kythe.proto";
    23  
    24  import "kythe/proto/storage.proto";
    25  
    26  // Persistent storage server for Kythe analysis data.
    27  // See: http://www.kythe.io/docs/kythe-storage.html
    28  service GraphStore {
    29    // Read responds with all Entry messages that match the given ReadRequest.
    30    // The Read operation should be implemented with time complexity proportional
    31    // to the size of the return set.
    32    rpc Read(ReadRequest) returns (stream Entry) {}
    33  
    34    // Scan responds with all Entry messages matching the given ScanRequest.  If a
    35    // ScanRequest field is empty, any entry value for that field matches and will
    36    // be returned.  Scan is similar to Read, but with no time complexity
    37    // restrictions.
    38    rpc Scan(ScanRequest) returns (stream Entry) {}
    39  
    40    // Write atomically inserts or updates a collection of entries into the store.
    41    // Each update is a tuple of the form (kind, target, fact, value).  For each
    42    // such update, an entry (source, kind, target, fact, value) is written into
    43    // the store, replacing any existing entry (source, kind, target, fact,
    44    // value') that may exist.  Note that this operation cannot delete any data
    45    // from the store; entries are only ever inserted or updated.  Apart from
    46    // acting atomically, no other constraints are placed on the implementation.
    47    rpc Write(WriteRequest) returns (WriteReply) {}
    48  }
    49  
    50  // ShardedGraphStores can be arbitrarily sharded for parallel processing.
    51  // Depending on the implementation, these methods may not return consistent
    52  // results when the store is being written to.  Shards are indexed from 0.
    53  service ShardedGraphStore {
    54    // Count returns the number of entries in the given shard.
    55    rpc Count(CountRequest) returns (CountReply) {}
    56  
    57    // Shard responds with each Entry in the given shard.
    58    rpc Shard(ShardRequest) returns (stream Entry) {}
    59  }