vitess-gh/proto
Deepthi Sigireddi 3670303cca
Merge pull request #5669 from planetscale/ss-vrepl-prep-lookup
vrepl: Prep for lookup vindex backfill
2020-01-12 16:23:50 -08:00
..
README.md proto: Add README.md to document our required style guide. 2017-03-23 19:14:34 +01:00
automation.proto add license in helm/misc/proto 2019-10-21 17:35:53 +08:00
automationservice.proto add license in helm/misc/proto 2019-10-21 17:35:53 +08:00
binlogdata.proto vreplication: stop_after_copy option 2020-01-07 17:11:39 -08:00
binlogservice.proto add license in helm/misc/proto 2019-10-21 17:35:53 +08:00
logutil.proto builds: fix protoc goimports issue 2019-12-31 14:53:04 -08:00
mysqlctl.proto add license in helm/misc/proto 2019-10-21 17:35:53 +08:00
query.proto delete AggregateStats, replace Resolver.stats with Resolver.queryService 2020-01-09 16:57:32 -08:00
queryservice.proto vdiff: resultStreamer 2019-11-02 17:34:13 -07:00
replicationdata.proto add license in helm/misc/proto 2019-10-21 17:35:53 +08:00
tableacl.proto add license in helm/misc/proto 2019-10-21 17:35:53 +08:00
tabletmanagerdata.proto tabletmanager: WaitForPosition 2019-11-02 17:35:51 -07:00
tabletmanagerservice.proto tabletmanager: WaitForPosition 2019-11-02 17:35:51 -07:00
throttlerdata.proto add license in helm/misc/proto 2019-10-21 17:35:53 +08:00
throttlerservice.proto add license in helm/misc/proto 2019-10-21 17:35:53 +08:00
topodata.proto builds: fix protoc goimports issue 2019-12-31 14:53:04 -08:00
vschema.proto add license in helm/misc/proto 2019-10-21 17:35:53 +08:00
vtctldata.proto vrepl: Materialize WIP 3 2019-12-30 21:22:49 -08:00
vtctlservice.proto add license in helm/misc/proto 2019-10-21 17:35:53 +08:00
vtgate.proto Added LastInsertId to the grpc Session object 2020-01-06 11:27:26 -08:00
vtgateservice.proto add license in helm/misc/proto 2019-10-21 17:35:53 +08:00
vtrpc.proto add license in helm/misc/proto 2019-10-21 17:35:53 +08:00
vttest.proto add license in helm/misc/proto 2019-10-21 17:35:53 +08:00
vttime.proto builds: fix protoc goimports issue 2019-12-31 14:53:04 -08:00
vtworkerdata.proto add license in helm/misc/proto 2019-10-21 17:35:53 +08:00
vtworkerservice.proto add license in helm/misc/proto 2019-10-21 17:35:53 +08:00
workflow.proto add license in helm/misc/proto 2019-10-21 17:35:53 +08:00

README.md

Vitess Protobuf Definitions

This directory contains all Vitess protobuf definitions.

Our protobuf messages are both used as wire format (e.g. query.proto) and for storage (e.g. topodata.proto).

RPC messages and service definitions are in separate files (e.g. vtgate.proto and vtgateservice.proto) on purpose because our internal deployment does not use gRPC.

Style Guide

Before creating new messages or services, please make yourself familiar with the style of the existing definitions first.

Additionally, new definitions must adhere to the Google Cloud API Design Guide: https://cloud.google.com/apis/design/

Comments

We are more strict than the Design Guide on the format for comments. Similar to comments for Go types or fields, protobuf comments must start with the name. For example:

// TabletAlias is a globally unique tablet identifier.
message TabletAlias {
  // cell is the cell (or datacenter) the tablet is in.
  string cell = 1;
  ...
}

Note that the Design Guide also has the following ask:

If the field value is required, input only, output only, it must be documented at the start of the field description. By default, all fields and parameters are optional.

Here's an example which combines this ask with our stricter comments style:

// ExecuteKeyspaceIdsRequest is the payload to ExecuteKeyspaceIds.
message ExecuteKeyspaceIdsRequest {
  ...
  // Required. keyspace to target the query to.
  string keyspace = 4;
  ...
}

Note that most of our existing files (as of March 2017) do not have e.g. "Required." comments. Nonetheless, new files should follow this where applicable.