Protocol Documentation
Table of Contents
Top
banyandb/common/v1/trace.proto
Span
Span is the basic unit of a trace.
| Field |
Type |
Label |
Description |
| start_time |
google.protobuf.Timestamp |
|
start_time is the start time of the span. |
| end_time |
google.protobuf.Timestamp |
|
end_time is the end time of the span. |
| error |
bool |
|
error indicates whether the span is an error span. |
| tags |
Tag |
repeated |
tags is a list of tags of the span. |
| message |
string |
|
message is the message generated by the span. |
| children |
Span |
repeated |
children is a list of child spans of the span. |
| duration |
int64 |
|
duration is the duration of the span. |
Tag
Tag is the key-value pair of a span.
| Field |
Type |
Label |
Description |
| key |
string |
|
key is the key of the tag. |
| value |
string |
|
value is the value of the tag. |
Trace
Trace is the top level message of a trace.
| Field |
Type |
Label |
Description |
| trace_id |
string |
|
trace_id is the unique identifier of the trace. |
| spans |
Span |
repeated |
spans is a list of spans in the trace. |
| error |
bool |
|
error indicates whether the trace is an error trace. |
Top
banyandb/model/v1/common.proto
FieldValue
Float
| Field |
Type |
Label |
Description |
| value |
double |
|
|
Int
| Field |
Type |
Label |
Description |
| value |
int64 |
|
|
IntArray
| Field |
Type |
Label |
Description |
| value |
int64 |
repeated |
|
Str
| Field |
Type |
Label |
Description |
| value |
string |
|
|
StrArray
| Field |
Type |
Label |
Description |
| value |
string |
repeated |
|
TagFamilyForWrite
| Field |
Type |
Label |
Description |
| tags |
TagValue |
repeated |
|
TagValue
AggregationFunction
| Name |
Number |
Description |
| AGGREGATION_FUNCTION_UNSPECIFIED |
0 |
|
| AGGREGATION_FUNCTION_MEAN |
1 |
|
| AGGREGATION_FUNCTION_MAX |
2 |
|
| AGGREGATION_FUNCTION_MIN |
3 |
|
| AGGREGATION_FUNCTION_COUNT |
4 |
|
| AGGREGATION_FUNCTION_SUM |
5 |
|
Top
banyandb/model/v1/query.proto
Condition
Condition consists of the query condition with a single binary operator to be imposed
For 1:1 BinaryOp, values in condition must be an array with length = 1,
while for 1:N BinaryOp, values can be an array with length >= 1.
Condition.MatchOption
Criteria
tag_families are indexed.
LogicalExpression
LogicalExpression supports logical operation
QueryOrder
QueryOrder means a Sort operation to be done for a given index rule.
The index_rule_name refers to the name of a index rule bound to the subject.
| Field |
Type |
Label |
Description |
| index_rule_name |
string |
|
|
| sort |
Sort |
|
|
Tag
Pair is the building block of a record which is equivalent to a key-value pair.
In the context of Trace, it could be metadata of a trace such as service_name, service_instance, etc.
Besides, other tags are organized in key-value pair in the underlying storage layer.
One should notice that the values can be a multi-value.
TagFamily
| Field |
Type |
Label |
Description |
| name |
string |
|
|
| tags |
Tag |
repeated |
|
TagProjection
TagProjection is used to select the names of keys to be returned.
TagProjection.TagFamily
| Field |
Type |
Label |
Description |
| name |
string |
|
|
| tags |
string |
repeated |
|
TimeRange
TimeRange is a range query for uint64,
the range here follows left-inclusive and right-exclusive rule, i.e. [begin, end) if both edges exist
Condition.BinaryOp
BinaryOp specifies the operation imposed to the given query condition
For EQ, NE, LT, GT, LE and GE, only one operand should be given, i.e. one-to-one relationship.
HAVING and NOT_HAVING allow multi-value to be the operand such as array/vector, i.e. one-to-many relationship.
For example, "keyA" contains "valueA" and "valueB"
MATCH performances a full-text search if the tag is analyzed.
The string value applies to the same analyzer as the tag, but string array value does not.
Each item in a string array is seen as a token instead of a query expression.
| Name |
Number |
Description |
| BINARY_OP_UNSPECIFIED |
0 |
|
| BINARY_OP_EQ |
1 |
|
| BINARY_OP_NE |
2 |
|
| BINARY_OP_LT |
3 |
|
| BINARY_OP_GT |
4 |
|
| BINARY_OP_LE |
5 |
|
| BINARY_OP_GE |
6 |
|
| BINARY_OP_HAVING |
7 |
|
| BINARY_OP_NOT_HAVING |
8 |
|
| BINARY_OP_IN |
9 |
|
| BINARY_OP_NOT_IN |
10 |
|
| BINARY_OP_MATCH |
11 |
|
Condition.MatchOption.Operator
| Name |
Number |
Description |
| OPERATOR_UNSPECIFIED |
0 |
|
| OPERATOR_AND |
1 |
|
| OPERATOR_OR |
2 |
|
LogicalExpression.LogicalOp
| Name |
Number |
Description |
| LOGICAL_OP_UNSPECIFIED |
0 |
|
| LOGICAL_OP_AND |
1 |
|
| LOGICAL_OP_OR |
2 |
|
Sort
| Name |
Number |
Description |
| SORT_UNSPECIFIED |
0 |
|
| SORT_DESC |
1 |
|
| SORT_ASC |
2 |
|
Top
banyandb/measure/v1/query.proto
DataPoint
DataPoint is stored in Measures
| Field |
Type |
Label |
Description |
| timestamp |
google.protobuf.Timestamp |
|
timestamp is in the timeunit of milliseconds. |
| tag_families |
banyandb.model.v1.TagFamily |
repeated |
tag_families contains tags selected in the projection |
| fields |
DataPoint.Field |
repeated |
fields contains fields selected in the projection |
| sid |
uint64 |
|
sid is the series id of the data point |
| version |
int64 |
|
version is the version of the data point in a series sid, timestamp and version are used to identify a data point |
DataPoint.Field
QueryRequest
QueryRequest is the request contract for query.
| Field |
Type |
Label |
Description |
| groups |
string |
repeated |
groups indicate where the data points are stored. |
| name |
string |
|
name is the identity of a measure. |
| time_range |
banyandb.model.v1.TimeRange |
|
time_range is a range query with begin/end time of entities in the timeunit of milliseconds. |
| criteria |
banyandb.model.v1.Criteria |
|
tag_families are indexed. |
| tag_projection |
banyandb.model.v1.TagProjection |
|
tag_projection can be used to select tags of the data points in the response |
| field_projection |
QueryRequest.FieldProjection |
|
field_projection can be used to select fields of the data points in the response |
| group_by |
QueryRequest.GroupBy |
|
group_by groups data points based on their field value for a specific tag and use field_name as the projection name |
| agg |
QueryRequest.Aggregation |
|
agg aggregates data points based on a field |
| top |
QueryRequest.Top |
|
top limits the result based on a particular field. If order_by is specified, top sorts the dataset based on order_by's output |
| offset |
uint32 |
|
offset is used to support pagination, together with the following limit. If top is specified, offset processes the dataset based on top's output |
| limit |
uint32 |
|
limit is used to impose a boundary on the number of records being returned. If top is specified, limit processes the dataset based on top's output |
| order_by |
banyandb.model.v1.QueryOrder |
|
order_by is given to specify the sort for a tag. |
| trace |
bool |
|
trace is used to enable trace for the query |
| stages |
string |
repeated |
stages is used to specify the stage of the data points in the lifecycle |
| rewrite_agg_top_n_result |
bool |
|
rewriteAggTopNResult will rewrite agg result to raw data |
QueryRequest.Aggregation
QueryRequest.FieldProjection
| Field |
Type |
Label |
Description |
| names |
string |
repeated |
|
QueryRequest.GroupBy
| Field |
Type |
Label |
Description |
| tag_projection |
banyandb.model.v1.TagProjection |
|
tag_projection must be a subset of the tag_projection of QueryRequest |
| field_name |
string |
|
field_name must be one of fields indicated by field_projection |
QueryRequest.Top
| Field |
Type |
Label |
Description |
| number |
int32 |
|
number set the how many items should be returned |
| field_name |
string |
|
field_name must be one of files indicated by the field_projection |
| field_value_sort |
banyandb.model.v1.Sort |
|
field_value_sort indicates how to sort fields ASC: bottomN DESC: topN UNSPECIFIED: topN |
QueryResponse
QueryResponse is the response for a query to the Query module.
| Field |
Type |
Label |
Description |
| data_points |
DataPoint |
repeated |
data_points are the actual data returned |
| trace |
banyandb.common.v1.Trace |
|
trace contains the trace information of the query when trace is enabled |
Top
banyandb/measure/v1/topn.proto
TopNList
TopNList contains a series of topN items
TopNList.Item
TopNRequest
TopNRequest is the request contract for query.
| Field |
Type |
Label |
Description |
| groups |
string |
repeated |
groups indicate where the data points are stored. |
| name |
string |
|
name is the identity of a measure. |
| time_range |
banyandb.model.v1.TimeRange |
|
time_range is a range query with begin/end time of entities in the timeunit of milliseconds. |
| top_n |
int32 |
|
top_n set the how many items should be returned in each list. |
| agg |
banyandb.model.v1.AggregationFunction |
|
agg aggregates lists grouped by field names in the time_range |
| conditions |
banyandb.model.v1.Condition |
repeated |
criteria select counters. Only equals are acceptable. |
| field_value_sort |
banyandb.model.v1.Sort |
|
field_value_sort indicates how to sort fields |
| trace |
bool |
|
trace is used to enable trace for the query |
| stages |
string |
repeated |
stages is used to specify the stage of the data points in the lifecycle |
TopNResponse
TopNResponse is the response for a query to the Query module.
| Field |
Type |
Label |
Description |
| lists |
TopNList |
repeated |
lists contain a series topN lists ranked by timestamp if agg_func in query request is specified, lists' size should be one. |
| trace |
banyandb.common.v1.Trace |
|
trace contains the trace information of the query when trace is enabled |
Top
banyandb/common/v1/common.proto
Group
Group is an internal object for Group management
| Field |
Type |
Label |
Description |
| metadata |
Metadata |
|
metadata define the group's identity |
| catalog |
Catalog |
|
catalog denotes which type of data the group contains |
| resource_opts |
ResourceOpts |
|
resourceOpts indicates the structure of the underlying kv storage |
| updated_at |
google.protobuf.Timestamp |
|
updated_at indicates when resources of the group are updated |
IntervalRule
IntervalRule is a structured duration
LifecycleStage
| Field |
Type |
Label |
Description |
| name |
string |
|
The stage name (e.g., "warm", "cold"). This should be a non-empty string. |
| shard_num |
uint32 |
|
Number of shards allocated for this stage. Must be greater than zero. |
| segment_interval |
IntervalRule |
|
Defines the interval for data segmentation in this stage. This is a required field and uses the IntervalRule structure. |
| ttl |
IntervalRule |
|
Specifies the time-to-live for data in this stage before moving to the next. This is also a required field using the IntervalRule structure. |
| node_selector |
string |
|
Node selector specifying target nodes for this stage. Optional; if provided, it must be a non-empty string. |
| close |
bool |
|
Indicates whether segments that are no longer live should be closed. |
| replicas |
uint32 |
|
replicas is the number of replicas for this stage. This is an optional field and defaults to 0. A value of 0 means no replicas, while a value of 1 means one primary shard and one replica. Higher values indicate more replicas. |
Metadata is for multi-tenant, multi-model use
| Field |
Type |
Label |
Description |
| group |
string |
|
group contains a set of options, like retention policy, max |
| name |
string |
|
name of the entity |
| id |
uint32 |
|
id is the unique identifier of the entity if id is not set, the system will generate a unique id |
| create_revision |
int64 |
|
readonly. create_revision is the revision of last creation on this key. |
| mod_revision |
int64 |
|
readonly. mod_revision is the revision of last modification on this key. |
ResourceOpts
| Field |
Type |
Label |
Description |
| shard_num |
uint32 |
|
shard_num is the number of shards |
| segment_interval |
IntervalRule |
|
segment_interval indicates the length of a segment |
| ttl |
IntervalRule |
|
ttl indicates time to live, how long the data will be cached |
| stages |
LifecycleStage |
repeated |
stages defines the ordered lifecycle stages. Data progresses through these stages sequentially. |
| default_stages |
string |
repeated |
default_stages is the name of the default stage |
| replicas |
uint32 |
|
replicas is the number of replicas. This is used to ensure high availability and fault tolerance. This is an optional field and defaults to 0. A value of 0 means no replicas, while a value of 1 means one primary shard and one replica. Higher values indicate more replicas. |
Catalog
| Name |
Number |
Description |
| CATALOG_UNSPECIFIED |
0 |
|
| CATALOG_STREAM |
1 |
|
| CATALOG_MEASURE |
2 |
|
| CATALOG_PROPERTY |
3 |
|
| CATALOG_TRACE |
4 |
|
IntervalRule.Unit
| Name |
Number |
Description |
| UNIT_UNSPECIFIED |
0 |
|
| UNIT_HOUR |
1 |
|
| UNIT_DAY |
2 |
|
Top
banyandb/property/v1/property.proto
Property
Property stores the user defined data
Top
banyandb/property/v1/rpc.proto
ApplyRequest
| Field |
Type |
Label |
Description |
| property |
Property |
|
|
| strategy |
ApplyRequest.Strategy |
|
strategy indicates how to update a property. It defaults to STRATEGY_MERGE |
ApplyResponse
| Field |
Type |
Label |
Description |
| created |
bool |
|
created indicates whether the property existed. True: the property is absent. False: the property existed. |
| tags_num |
uint32 |
|
|
DeleteRequest
| Field |
Type |
Label |
Description |
| group |
string |
|
groups indicate where the data points are stored. |
| name |
string |
|
name is the identity of a property. |
| id |
string |
|
id is the identity of item in the property. |
DeleteResponse
| Field |
Type |
Label |
Description |
| deleted |
bool |
|
|
InternalDeleteRequest
| Field |
Type |
Label |
Description |
| ids |
bytes |
repeated |
|
InternalQueryResponse
| Field |
Type |
Label |
Description |
| sources |
bytes |
repeated |
|
| trace |
banyandb.common.v1.Trace |
|
|
| deletes |
int64 |
repeated |
deletes indicates the property is deleted timestamps, it's mapping to the sources in the same order if the value is 0, it means the property is not deleted |
InternalRepairRequest
InternalRepairResponse
InternalUpdateRequest
QueryRequest
QueryRequest is the request contract for query.
| Field |
Type |
Label |
Description |
| groups |
string |
repeated |
groups indicate where the data points are stored. |
| name |
string |
|
name is created when it receives the first property |
| ids |
string |
repeated |
ids is the identities of properties |
| criteria |
banyandb.model.v1.Criteria |
|
criteria is used to filter properties based on tags |
| tag_projection |
string |
repeated |
tag_projection can be used to select tags of the data points in the response |
| limit |
uint32 |
|
|
| trace |
bool |
|
trace is used to enable trace for the query |
QueryResponse
QueryResponse is the response for a query to the Query module.
| Field |
Type |
Label |
Description |
| properties |
Property |
repeated |
properties are the actual data returned |
| trace |
banyandb.common.v1.Trace |
|
trace contains the trace information of the query when trace is enabled |
ApplyRequest.Strategy
| Name |
Number |
Description |
| STRATEGY_UNSPECIFIED |
0 |
|
| STRATEGY_MERGE |
1 |
|
| STRATEGY_REPLACE |
2 |
|
PropertyService
Top
banyandb/stream/v1/query.proto
Element
Element represents
(stream context) a Span defined in Google Dapper paper or equivalently a Segment in Skywalking.
(Log context) a log
| Field |
Type |
Label |
Description |
| element_id |
string |
|
element_id could be span_id of a Span or segment_id of a Segment in the context of stream |
| timestamp |
google.protobuf.Timestamp |
|
timestamp represents a millisecond 1) either the start time of a Span/Segment, 2) or the timestamp of a log |
| tag_families |
banyandb.model.v1.TagFamily |
repeated |
fields contains all indexed Field. Some typical names, - stream_id - duration - service_name - service_instance_id - end_time_milliseconds |
QueryRequest
QueryRequest is the request contract for query.
| Field |
Type |
Label |
Description |
| groups |
string |
repeated |
groups indicate where the elements are stored. |
| name |
string |
|
name is the identity of a stream. |
| time_range |
banyandb.model.v1.TimeRange |
|
time_range is a range query with begin/end time of entities in the timeunit of milliseconds. In the context of stream, it represents the range of the startTime for spans/segments, while in the context of Log, it means the range of the timestamp(s) for logs. it is always recommended to specify time range for performance reason |
| offset |
uint32 |
|
offset is used to support pagination, together with the following limit |
| limit |
uint32 |
|
limit is used to impose a boundary on the number of records being returned |
| order_by |
banyandb.model.v1.QueryOrder |
|
order_by is given to specify the sort for a field. So far, only fields in the type of Integer are supported |
| criteria |
banyandb.model.v1.Criteria |
|
tag_families are indexed. |
| projection |
banyandb.model.v1.TagProjection |
|
projection can be used to select the key names of the element in the response |
| trace |
bool |
|
trace is used to enable trace for the query |
| stages |
string |
repeated |
stage is used to specify the stage of the query in the lifecycle |
QueryResponse
QueryResponse is the response for a query to the Query module.
| Field |
Type |
Label |
Description |
| elements |
Element |
repeated |
elements are the actual data returned |
| trace |
banyandb.common.v1.Trace |
|
trace contains the trace information of the query when trace is enabled |
Top
banyandb/trace/v1/query.proto
InternalQueryResponse
InternalQueryResponse is the response of an internal query.
| Field |
Type |
Label |
Description |
| internal_traces |
InternalTrace |
repeated |
internal_traces is a list of internal traces that match the query. |
| trace_query_result |
banyandb.common.v1.Trace |
|
trace_query_result contains the trace of the query execution if tracing is enabled. |
InternalTrace
InternalTrace is the trace that is used for internal use.
| Field |
Type |
Label |
Description |
| spans |
Span |
repeated |
spans are the spans that belong to this trace. |
| trace_id |
string |
|
trace_id is the unique identifier of the trace. |
| key |
int64 |
|
key is used for sorting. |
QueryRequest
QueryRequest is the request contract for query.
| Field |
Type |
Label |
Description |
| groups |
string |
repeated |
groups indicates the physical data location. |
| name |
string |
|
name is the identity of a trace. |
| time_range |
banyandb.model.v1.TimeRange |
|
time_range is a range query with begin/end time of entities in the timeunit of milliseconds. In the context of trace, it represents the range of the startTime for spans/segments, it is always recommended to specify time range for performance reason |
| offset |
uint32 |
|
offset is used to support pagination, together with the following limit |
| limit |
uint32 |
|
limit is used to impose a boundary on the number of spans being returned |
| order_by |
banyandb.model.v1.QueryOrder |
|
order_by is given to specify the sort for a tag. So far, only tags in the type of Integer are supported |
| criteria |
banyandb.model.v1.Criteria |
|
criteria is the filter criteria. |
| tag_projection |
string |
repeated |
projection can be used to select the names of the tags in the response |
| trace |
bool |
|
trace is used to enable trace for the query |
| stages |
string |
repeated |
stage is used to specify the stage of the query in the lifecycle |
QueryResponse
QueryResponse is the response of a query.
| Field |
Type |
Label |
Description |
| traces |
Trace |
repeated |
traces is a list of traces that match the query, with spans grouped by trace ID. |
| trace_query_result |
banyandb.common.v1.Trace |
|
trace_query_result contains the trace of the query execution if tracing is enabled. |
Span
Span is a single operation within a trace.
| Field |
Type |
Label |
Description |
| tags |
banyandb.model.v1.Tag |
repeated |
tags are the indexed tags of the span. |
| span |
bytes |
|
span is the raw span data. |
| span_id |
string |
|
span_id is the unique identifier of the span. |
Trace
Trace contains all spans that belong to a single trace ID.
| Field |
Type |
Label |
Description |
| spans |
Span |
repeated |
spans is the list of spans that belong to this trace. |
| trace_id |
string |
|
trace_id is the unique identifier of the trace. |
Top
banyandb/bydbql/v1/query.proto
QueryRequest
QueryRequest is the main request message for BydbQL queries
| Field |
Type |
Label |
Description |
| query |
string |
|
query is the BydbQL query string |
QueryResponse
QueryResponse contains the result of a BydbQL query
Top
banyandb/bydbql/v1/rpc.proto
BydbQLService
BydbQLService provides query interface for BanyanDB Query Language (BydbQL)
| Method Name |
Request Type |
Response Type |
Description |
| Query |
QueryRequest |
QueryResponse |
Query executes a generic BydbQL query with explicit FROM clause This endpoint requires the query to specify the resource type and name in the FROM clause (e.g., "FROM STREAM sw", "FROM MEASURE metrics") |
Top
banyandb/model/v1/write.proto
Status
Status is the response status for write
| Name |
Number |
Description |
| STATUS_UNSPECIFIED |
0 |
|
| STATUS_SUCCEED |
1 |
|
| STATUS_INVALID_TIMESTAMP |
2 |
|
| STATUS_NOT_FOUND |
3 |
|
| STATUS_EXPIRED_SCHEMA |
4 |
|
| STATUS_INTERNAL_ERROR |
5 |
|
| STATUS_DISK_FULL |
6 |
|
| STATUS_VERSION_UNSUPPORTED |
7 |
Client version not supported |
| STATUS_VERSION_DEPRECATED |
8 |
Client version deprecated but still supported |
Top
banyandb/cluster/v1/rpc.proto
FileInfo
Information about an individual file within a part.
| Field |
Type |
Label |
Description |
| name |
string |
|
File identifier (e.g., "primary", "timestamps", "tagFamilies:seriesId"). |
| offset |
uint32 |
|
Byte offset within the part where this file starts. |
| size |
uint32 |
|
Size of this file in bytes. |
HealthCheckRequest
| Field |
Type |
Label |
Description |
| service_name |
string |
|
|
HealthCheckResponse
PartInfo
Information about a part contained within a chunk.
| Field |
Type |
Label |
Description |
| id |
uint64 |
|
Unique identifier for this part. |
| files |
FileInfo |
repeated |
Information about individual files within this part. |
| compressed_size_bytes |
uint64 |
|
Compressed size in bytes from partMetadata. |
| uncompressed_size_bytes |
uint64 |
|
Uncompressed size in bytes from partMetadata. |
| total_count |
uint64 |
|
Total count from partMetadata. |
| blocks_count |
uint64 |
|
Blocks count from partMetadata. |
| min_timestamp |
int64 |
|
Minimum timestamp from partMetadata. |
| max_timestamp |
int64 |
|
Maximum timestamp from partMetadata. |
| min_key |
int64 |
|
Minimum user-provided key for sidx. |
| max_key |
int64 |
|
Maximum user-provided key for sidx. |
| part_type |
string |
|
Part type. |
PartResult
PartResult contains the result for individual parts.
| Field |
Type |
Label |
Description |
| success |
bool |
|
Whether this part was processed successfully. |
| error |
string |
|
Error message if processing failed. |
| bytes_processed |
uint32 |
|
Number of bytes processed for this part. |
SendRequest
SendResponse
SyncCompletion
SyncCompletion contains completion information for the sync operation.
| Field |
Type |
Label |
Description |
| total_bytes_sent |
uint64 |
|
Total bytes sent for validation. |
| total_parts_sent |
uint32 |
|
Total number of parts sent. |
| total_chunks |
uint32 |
|
Total number of chunks in this sync. |
SyncMetadata contains metadata for the sync operation.
| Field |
Type |
Label |
Description |
| group |
string |
|
Group name (stream/measure). |
| shard_id |
uint32 |
|
Shard identifier. |
| topic |
string |
|
Sync topic (stream-part-sync or measure-part-sync). |
| timestamp |
int64 |
|
Timestamp when sync started. |
| total_parts |
uint32 |
|
Total number of parts being synced. |
SyncPartRequest
Chunked Sync Service Messages.
| Field |
Type |
Label |
Description |
| session_id |
string |
|
Unique session identifier for this sync operation. |
| chunk_index |
uint32 |
|
Current chunk index (0-based). |
| chunk_data |
bytes |
|
Actual chunk data. |
| chunk_checksum |
string |
|
CRC32 checksum for this chunk. |
| parts_info |
PartInfo |
repeated |
Information about parts contained in this chunk. |
| metadata |
SyncMetadata |
|
Sent with first chunk (chunk_index = 0). |
| completion |
SyncCompletion |
|
Sent with last chunk to finalize. |
| version_info |
VersionInfo |
|
version_info contains version information |
SyncPartResponse
SyncPartResponse contains the response for a sync part request.
| Field |
Type |
Label |
Description |
| session_id |
string |
|
|
| chunk_index |
uint32 |
|
|
| status |
SyncStatus |
|
|
| error |
string |
|
|
| sync_result |
SyncResult |
|
Final result when sync completes. |
| version_compatibility |
VersionCompatibility |
|
version_compatibility contains version compatibility information when status indicates version issues |
SyncResult
SyncResult contains the result of a sync operation.
| Field |
Type |
Label |
Description |
| success |
bool |
|
Whether entire sync was successful. |
| total_bytes_received |
uint64 |
|
Total bytes received. |
| duration_ms |
int64 |
|
Time taken for sync in milliseconds. |
| chunks_received |
uint32 |
|
Number of chunks successfully received. |
| parts_received |
uint32 |
|
Number of parts successfully received. |
| parts_results |
PartResult |
repeated |
Results for each part. |
VersionCompatibility
| Field |
Type |
Label |
Description |
| supported |
bool |
|
supported indicates whether the client version is supported |
| server_api_version |
string |
|
server_api_version is the API version of the server |
| supported_api_versions |
string |
repeated |
supported_api_versions lists API versions supported by the server |
| server_file_format_version |
string |
|
server_file_format_version is the file format version of the server |
| supported_file_format_versions |
string |
repeated |
supported_file_format_versions lists file format versions supported by the server |
| reason |
string |
|
reason provides human-readable explanation of version incompatibility |
VersionInfo
| Field |
Type |
Label |
Description |
| file_format_version |
string |
|
file_format_version indicates the file format version used |
| compatible_file_format_version |
string |
repeated |
compatible_file_format_version lists backward compatible versions |
| api_version |
string |
|
api_version indicates the API semantic version |
SyncStatus
SyncStatus represents the status of a sync operation.
| Name |
Number |
Description |
| SYNC_STATUS_UNSPECIFIED |
0 |
Unspecified status. |
| SYNC_STATUS_CHUNK_RECEIVED |
1 |
Chunk received and validated successfully. |
| SYNC_STATUS_CHUNK_CHECKSUM_MISMATCH |
2 |
Chunk checksum validation failed. |
| SYNC_STATUS_CHUNK_OUT_OF_ORDER |
3 |
Chunk received out of expected order. |
| SYNC_STATUS_SESSION_NOT_FOUND |
4 |
Session ID not recognized. |
| SYNC_STATUS_SYNC_COMPLETE |
5 |
Entire sync operation completed successfully. |
| SYNC_STATUS_VERSION_UNSUPPORTED |
6 |
Version not supported for sync operations. |
| SYNC_STATUS_FORMAT_VERSION_MISMATCH |
7 |
File format version incompatible. |
ChunkedSyncService
ChunkedSyncService provides streaming sync capabilities for chunked data transfer.
| Method Name |
Request Type |
Response Type |
Description |
| SyncPart |
SyncPartRequest stream |
SyncPartResponse stream |
SyncPart synchronizes part data using chunked transfer. |
Service
Top
banyandb/common/v1/rpc.proto
APIVersion
APIVersion is the version of the API
| Field |
Type |
Label |
Description |
| version |
string |
|
version is the version of the API |
| revision |
string |
|
revision is the commit hash of the API |
GetAPIVersionRequest
GetAPIVersionRequest is the request for GetAPIVersion
empty
GetAPIVersionResponse
GetAPIVersionResponse is the response for GetAPIVersion
| Field |
Type |
Label |
Description |
| version |
APIVersion |
|
version is the version of the API |
Service
Service is the service for the API
Top
banyandb/database/v1/database.proto
Node
Node.LabelsEntry
Shard
Role
| Name |
Number |
Description |
| ROLE_UNSPECIFIED |
0 |
|
| ROLE_META |
1 |
|
| ROLE_DATA |
2 |
|
| ROLE_LIAISON |
3 |
|
Top
banyandb/database/v1/schema.proto
Entity
| Field |
Type |
Label |
Description |
| tag_names |
string |
repeated |
|
FieldSpec
FieldSpec is the specification of field
| Field |
Type |
Label |
Description |
| name |
string |
|
name is the identity of a field |
| field_type |
FieldType |
|
field_type denotes the type of field value |
| encoding_method |
EncodingMethod |
|
encoding_method indicates how to encode data during writing |
| compression_method |
CompressionMethod |
|
compression_method indicates how to compress data during writing |
IndexRule
IndexRule defines how to generate indices based on tags and the index type
IndexRule should bind to a subject through an IndexRuleBinding to generate proper indices.
| Field |
Type |
Label |
Description |
| metadata |
banyandb.common.v1.Metadata |
|
metadata define the rule's identity |
| tags |
string |
repeated |
tags are the combination that refers to an indexed object If the elements in tags are more than 1, the object will generate a multi-tag index Caveat: All tags in a multi-tag MUST have an identical IndexType |
| type |
IndexRule.Type |
|
type is the IndexType of this IndexObject. |
| updated_at |
google.protobuf.Timestamp |
|
updated_at indicates when the IndexRule is updated |
| analyzer |
string |
|
analyzer analyzes tag value to support the full-text searching for TYPE_INVERTED indices. available analyzers are: - "standard" provides grammar based tokenization - "simple" breaks text into tokens at any non-letter character, such as numbers, spaces, hyphens and apostrophes, discards non-letter characters, and changes uppercase to lowercase. - "keyword" is a “noop” analyzer which returns the entire input string as a single token. - "url" breaks test into tokens at any non-letter and non-digit character. |
| no_sort |
bool |
|
no_sort indicates whether the index is not for sorting. |
IndexRuleBinding
IndexRuleBinding is a bridge to connect severalIndexRules to a subject
This binding is valid between begin_at_nanoseconds and expire_at_nanoseconds, that provides flexible strategies
to control how to generate time series indices.
| Field |
Type |
Label |
Description |
| metadata |
banyandb.common.v1.Metadata |
|
metadata is the identity of this binding |
| rules |
string |
repeated |
rules refers to the IndexRule |
| subject |
Subject |
|
subject indicates the subject of binding action |
| begin_at |
google.protobuf.Timestamp |
|
begin_at_nanoseconds is the timestamp, after which the binding will be active |
| expire_at |
google.protobuf.Timestamp |
|
expire_at_nanoseconds it the timestamp, after which the binding will be inactive expire_at_nanoseconds must be larger than begin_at_nanoseconds |
| updated_at |
google.protobuf.Timestamp |
|
updated_at indicates when the IndexRuleBinding is updated |
Measure
Measure intends to store data point
| Field |
Type |
Label |
Description |
| metadata |
banyandb.common.v1.Metadata |
|
metadata is the identity of a measure |
| tag_families |
TagFamilySpec |
repeated |
tag_families are for filter measures |
| fields |
FieldSpec |
repeated |
fields denote measure values |
| entity |
Entity |
|
entity indicates which tags will be to generate a series and shard a measure |
| interval |
string |
|
interval indicates how frequently to send a data point valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h", "d". |
| updated_at |
google.protobuf.Timestamp |
|
updated_at indicates when the measure is updated |
| index_mode |
bool |
|
index_mode specifies whether the data should be stored exclusively in the index, meaning it will not be stored in the data storage system. |
| sharding_key |
ShardingKey |
|
sharding_key determines the distribution of TopN-related data. |
Property
Property stores the user defined data
ShardingKey
| Field |
Type |
Label |
Description |
| tag_names |
string |
repeated |
|
Stream
Stream intends to store streaming data, for example, traces or logs
Subject
Subject defines which stream or measure would generate indices
TagFamilySpec
| Field |
Type |
Label |
Description |
| name |
string |
|
|
| tags |
TagSpec |
repeated |
tags defines accepted tags |
TopNAggregation
TopNAggregation generates offline TopN statistics for a measure's TopN approximation
Trace
Trace defines a tracing-specific storage resource.
It is suitable for storing traces and spans.
The name of a Trace is a logical namespace within a group,
while the group of a Trace corresponds to a physical directory.
| Field |
Type |
Label |
Description |
| metadata |
banyandb.common.v1.Metadata |
|
metadata is the identity of the trace resource. |
| tags |
TraceTagSpec |
repeated |
tags are the specification of tags. |
| trace_id_tag_name |
string |
|
trace_id_tag_name is the name of the tag that stores the trace ID. |
| timestamp_tag_name |
string |
|
timestamp_tag_name is the name of the tag that stores the timestamp. |
| updated_at |
google.protobuf.Timestamp |
|
updated_at indicates when the trace resource is updated. |
| span_id_tag_name |
string |
|
span_id_tag_name is the name of the tag that stores the span ID. |
TraceTagSpec defines the specification of a tag in a trace.
| Field |
Type |
Label |
Description |
| name |
string |
|
name is the name of the tag. |
| type |
TagType |
|
type is the type of the tag. |
CompressionMethod
| Name |
Number |
Description |
| COMPRESSION_METHOD_UNSPECIFIED |
0 |
|
| COMPRESSION_METHOD_ZSTD |
1 |
|
EncodingMethod
| Name |
Number |
Description |
| ENCODING_METHOD_UNSPECIFIED |
0 |
|
| ENCODING_METHOD_GORILLA |
1 |
|
FieldType
| Name |
Number |
Description |
| FIELD_TYPE_UNSPECIFIED |
0 |
|
| FIELD_TYPE_STRING |
1 |
|
| FIELD_TYPE_INT |
2 |
|
| FIELD_TYPE_DATA_BINARY |
3 |
|
| FIELD_TYPE_FLOAT |
4 |
|
IndexRule.Type
Type determine the index structure under the hood
| Name |
Number |
Description |
| TYPE_UNSPECIFIED |
0 |
|
| TYPE_INVERTED |
1 |
|
| TYPE_SKIPPING |
2 |
|
| TYPE_TREE |
3 |
TYPE_TREE is a tree index, which is used for storing hierarchical data. |
TagType
| Name |
Number |
Description |
| TAG_TYPE_UNSPECIFIED |
0 |
|
| TAG_TYPE_STRING |
1 |
|
| TAG_TYPE_INT |
2 |
|
| TAG_TYPE_STRING_ARRAY |
3 |
|
| TAG_TYPE_INT_ARRAY |
4 |
|
| TAG_TYPE_DATA_BINARY |
5 |
|
| TAG_TYPE_TIMESTAMP |
6 |
|
Top
banyandb/database/v1/rpc.proto
GroupRegistryServiceCreateRequest
GroupRegistryServiceCreateResponse
GroupRegistryServiceDeleteRequest
| Field |
Type |
Label |
Description |
| group |
string |
|
|
GroupRegistryServiceDeleteResponse
| Field |
Type |
Label |
Description |
| deleted |
bool |
|
|
GroupRegistryServiceExistRequest
| Field |
Type |
Label |
Description |
| group |
string |
|
|
GroupRegistryServiceExistResponse
| Field |
Type |
Label |
Description |
| has_group |
bool |
|
|
GroupRegistryServiceGetRequest
| Field |
Type |
Label |
Description |
| group |
string |
|
|
GroupRegistryServiceGetResponse
GroupRegistryServiceListRequest
GroupRegistryServiceListResponse
GroupRegistryServiceUpdateRequest
GroupRegistryServiceUpdateResponse
IndexRuleBindingRegistryServiceCreateRequest
IndexRuleBindingRegistryServiceCreateResponse
IndexRuleBindingRegistryServiceDeleteRequest
IndexRuleBindingRegistryServiceDeleteResponse
| Field |
Type |
Label |
Description |
| deleted |
bool |
|
|
IndexRuleBindingRegistryServiceExistRequest
IndexRuleBindingRegistryServiceExistResponse
| Field |
Type |
Label |
Description |
| has_group |
bool |
|
|
| has_index_rule_binding |
bool |
|
|
IndexRuleBindingRegistryServiceGetRequest
IndexRuleBindingRegistryServiceGetResponse
IndexRuleBindingRegistryServiceListRequest
| Field |
Type |
Label |
Description |
| group |
string |
|
|
IndexRuleBindingRegistryServiceListResponse
IndexRuleBindingRegistryServiceUpdateRequest
IndexRuleBindingRegistryServiceUpdateResponse
IndexRuleRegistryServiceCreateRequest
| Field |
Type |
Label |
Description |
| index_rule |
IndexRule |
|
|
IndexRuleRegistryServiceCreateResponse
IndexRuleRegistryServiceDeleteRequest
IndexRuleRegistryServiceDeleteResponse
| Field |
Type |
Label |
Description |
| deleted |
bool |
|
|
IndexRuleRegistryServiceExistRequest
IndexRuleRegistryServiceExistResponse
| Field |
Type |
Label |
Description |
| has_group |
bool |
|
|
| has_index_rule |
bool |
|
|
IndexRuleRegistryServiceGetRequest
IndexRuleRegistryServiceGetResponse
| Field |
Type |
Label |
Description |
| index_rule |
IndexRule |
|
|
IndexRuleRegistryServiceListRequest
| Field |
Type |
Label |
Description |
| group |
string |
|
|
IndexRuleRegistryServiceListResponse
| Field |
Type |
Label |
Description |
| index_rule |
IndexRule |
repeated |
|
IndexRuleRegistryServiceUpdateRequest
| Field |
Type |
Label |
Description |
| index_rule |
IndexRule |
|
|
IndexRuleRegistryServiceUpdateResponse
MeasureRegistryServiceCreateRequest
| Field |
Type |
Label |
Description |
| measure |
Measure |
|
|
MeasureRegistryServiceCreateResponse
| Field |
Type |
Label |
Description |
| mod_revision |
int64 |
|
|
MeasureRegistryServiceDeleteRequest
MeasureRegistryServiceDeleteResponse
| Field |
Type |
Label |
Description |
| deleted |
bool |
|
|
MeasureRegistryServiceExistRequest
MeasureRegistryServiceExistResponse
| Field |
Type |
Label |
Description |
| has_group |
bool |
|
|
| has_measure |
bool |
|
|
MeasureRegistryServiceGetRequest
MeasureRegistryServiceGetResponse
| Field |
Type |
Label |
Description |
| measure |
Measure |
|
|
MeasureRegistryServiceListRequest
| Field |
Type |
Label |
Description |
| group |
string |
|
|
MeasureRegistryServiceListResponse
| Field |
Type |
Label |
Description |
| measure |
Measure |
repeated |
|
MeasureRegistryServiceUpdateRequest
| Field |
Type |
Label |
Description |
| measure |
Measure |
|
|
MeasureRegistryServiceUpdateResponse
| Field |
Type |
Label |
Description |
| mod_revision |
int64 |
|
|
PropertyRegistryServiceCreateRequest
| Field |
Type |
Label |
Description |
| property |
Property |
|
|
PropertyRegistryServiceCreateResponse
| Field |
Type |
Label |
Description |
| mod_revision |
int64 |
|
|
PropertyRegistryServiceDeleteRequest
PropertyRegistryServiceDeleteResponse
| Field |
Type |
Label |
Description |
| deleted |
bool |
|
|
PropertyRegistryServiceExistRequest
PropertyRegistryServiceExistResponse
| Field |
Type |
Label |
Description |
| has_group |
bool |
|
|
| has_property |
bool |
|
|
PropertyRegistryServiceGetRequest
PropertyRegistryServiceGetResponse
| Field |
Type |
Label |
Description |
| property |
Property |
|
|
PropertyRegistryServiceListRequest
| Field |
Type |
Label |
Description |
| group |
string |
|
|
PropertyRegistryServiceListResponse
| Field |
Type |
Label |
Description |
| properties |
Property |
repeated |
|
PropertyRegistryServiceUpdateRequest
| Field |
Type |
Label |
Description |
| property |
Property |
|
|
PropertyRegistryServiceUpdateResponse
| Field |
Type |
Label |
Description |
| mod_revision |
int64 |
|
|
Snapshot
SnapshotRequest
SnapshotRequest.Group
SnapshotResponse
| Field |
Type |
Label |
Description |
| snapshots |
Snapshot |
repeated |
|
StreamRegistryServiceCreateRequest
| Field |
Type |
Label |
Description |
| stream |
Stream |
|
|
StreamRegistryServiceCreateResponse
| Field |
Type |
Label |
Description |
| mod_revision |
int64 |
|
|
StreamRegistryServiceDeleteRequest
StreamRegistryServiceDeleteResponse
| Field |
Type |
Label |
Description |
| deleted |
bool |
|
|
StreamRegistryServiceExistRequest
StreamRegistryServiceExistResponse
| Field |
Type |
Label |
Description |
| has_group |
bool |
|
|
| has_stream |
bool |
|
|
StreamRegistryServiceGetRequest
StreamRegistryServiceGetResponse
| Field |
Type |
Label |
Description |
| stream |
Stream |
|
|
StreamRegistryServiceListRequest
| Field |
Type |
Label |
Description |
| group |
string |
|
|
StreamRegistryServiceListResponse
| Field |
Type |
Label |
Description |
| stream |
Stream |
repeated |
|
StreamRegistryServiceUpdateRequest
| Field |
Type |
Label |
Description |
| stream |
Stream |
|
|
StreamRegistryServiceUpdateResponse
| Field |
Type |
Label |
Description |
| mod_revision |
int64 |
|
|
TopNAggregationRegistryServiceCreateRequest
TopNAggregationRegistryServiceCreateResponse
TopNAggregationRegistryServiceDeleteRequest
TopNAggregationRegistryServiceDeleteResponse
| Field |
Type |
Label |
Description |
| deleted |
bool |
|
|
TopNAggregationRegistryServiceExistRequest
TopNAggregationRegistryServiceExistResponse
| Field |
Type |
Label |
Description |
| has_group |
bool |
|
|
| has_top_n_aggregation |
bool |
|
|
TopNAggregationRegistryServiceGetRequest
TopNAggregationRegistryServiceGetResponse
TopNAggregationRegistryServiceListRequest
| Field |
Type |
Label |
Description |
| group |
string |
|
|
TopNAggregationRegistryServiceListResponse
TopNAggregationRegistryServiceUpdateRequest
TopNAggregationRegistryServiceUpdateResponse
TraceRegistryServiceCreateRequest
| Field |
Type |
Label |
Description |
| trace |
Trace |
|
|
TraceRegistryServiceCreateResponse
| Field |
Type |
Label |
Description |
| mod_revision |
int64 |
|
|
TraceRegistryServiceDeleteRequest
TraceRegistryServiceDeleteResponse
| Field |
Type |
Label |
Description |
| deleted |
bool |
|
|
TraceRegistryServiceExistRequest
TraceRegistryServiceExistResponse
| Field |
Type |
Label |
Description |
| has_group |
bool |
|
|
| has_trace |
bool |
|
|
TraceRegistryServiceGetRequest
TraceRegistryServiceGetResponse
| Field |
Type |
Label |
Description |
| trace |
Trace |
|
|
TraceRegistryServiceListRequest
| Field |
Type |
Label |
Description |
| group |
string |
|
|
TraceRegistryServiceListResponse
| Field |
Type |
Label |
Description |
| trace |
Trace |
repeated |
|
TraceRegistryServiceUpdateRequest
| Field |
Type |
Label |
Description |
| trace |
Trace |
|
|
TraceRegistryServiceUpdateResponse
| Field |
Type |
Label |
Description |
| mod_revision |
int64 |
|
|
GroupRegistryService
IndexRuleBindingRegistryService
IndexRuleRegistryService
MeasureRegistryService
PropertyRegistryService
SnapshotService
StreamRegistryService
TopNAggregationRegistryService
TraceRegistryService
Top
banyandb/measure/v1/write.proto
DataPointValue
DataPointValue is the data point for writing. It only contains values.
InternalWriteRequest
WriteRequest
WriteRequest is the request contract for write
WriteResponse
WriteResponse is the response contract for write
| Field |
Type |
Label |
Description |
| message_id |
uint64 |
|
the message_id from request. |
| status |
string |
|
status indicates the request processing result |
| metadata |
banyandb.common.v1.Metadata |
|
the metadata from request when request fails |
Top
banyandb/measure/v1/rpc.proto
DeleteExpiredSegmentsRequest
DeleteExpiredSegmentsResponse
| Field |
Type |
Label |
Description |
| deleted |
int64 |
|
|
MeasureService
Top
banyandb/property/v1/gossip.proto
PropagationContext
| Field |
Type |
Label |
Description |
| nodes |
string |
repeated |
|
| max_propagation_count |
int32 |
|
|
| current_propagation_count |
int32 |
|
|
| origin_node |
string |
|
|
PropagationRequest
PropagationResponse
PropagationTraceContext
| Field |
Type |
Label |
Description |
| trace_id |
string |
|
|
| parent_span_id |
string |
|
|
GossipService
Top
banyandb/property/v1/repair.proto
DifferTreeSummary
| Field |
Type |
Label |
Description |
| nodes |
TreeLeafNode |
repeated |
if the nodes is empty, mean the server side don't have more tree leaf nodes to send. |
PropertyMissing
| Field |
Type |
Label |
Description |
| entity |
string |
|
|
PropertySync
PropertySyncWithFrom
RepairRequest
| Field |
Type |
Label |
Description |
| tree_root |
TreeRoot |
|
compare stage |
| tree_slots |
TreeSlots |
|
|
| property_missing |
PropertyMissing |
|
repair stage case 1: client missing but server existing |
| property_sync |
PropertySync |
|
case 2: client existing but server missing case 3: SHA value mismatches |
| wait_next_differ |
WaitNextDifferData |
|
wait next differ tree summary for process |
RepairResponse
RootCompare
| Field |
Type |
Label |
Description |
| tree_found |
bool |
|
|
| root_sha_match |
bool |
|
|
TreeLeafNode
| Field |
Type |
Label |
Description |
| slot_index |
int32 |
|
slot_index is the index of the slot in the tree. |
| exists |
bool |
|
if the slot is empty, means the server side don't have the slot. |
| entity |
string |
|
if the slot and entity exists, the SHA value of the entity. |
| sha |
string |
|
|
TreeRoot
TreeSlotSHA
TreeSlots
| Field |
Type |
Label |
Description |
| slot_sha |
TreeSlotSHA |
repeated |
|
WaitNextDifferData
PropertySyncFromType
| Name |
Number |
Description |
| PROPERTY_SYNC_FROM_TYPE_UNSPECIFIED |
0 |
|
| PROPERTY_SYNC_FROM_TYPE_MISSING |
1 |
client missing but server existing |
| PROPERTY_SYNC_FROM_TYPE_SYNC |
2 |
client existing but server missing or SHA value mismatches |
RepairService
Top
banyandb/stream/v1/write.proto
ElementValue
| Field |
Type |
Label |
Description |
| element_id |
string |
|
element_id could be span_id of a Span or segment_id of a Segment in the context of stream |
| timestamp |
google.protobuf.Timestamp |
|
timestamp is in the timeunit of milliseconds. It represents 1) either the start time of a Span/Segment, 2) or the timestamp of a log |
| tag_families |
banyandb.model.v1.TagFamilyForWrite |
repeated |
the order of tag_families' items match the stream schema |
InternalWriteRequest
WriteRequest
WriteResponse
| Field |
Type |
Label |
Description |
| message_id |
uint64 |
|
the message_id from request. |
| status |
string |
|
status indicates the request processing result |
| metadata |
banyandb.common.v1.Metadata |
|
the metadata from request when request fails |
Top
banyandb/stream/v1/rpc.proto
DeleteExpiredSegmentsRequest
DeleteExpiredSegmentsResponse
| Field |
Type |
Label |
Description |
| deleted |
int64 |
|
|
StreamService
Top
banyandb/trace/v1/write.proto
InternalWriteRequest
WriteRequest
WriteResponse
Top
banyandb/trace/v1/rpc.proto
TraceService
Scalar Value Types
| .proto Type |
Notes |
C++ |
Java |
Python |
Go |
C# |
PHP |
Ruby |
| double |
|
double |
double |
float |
float64 |
double |
float |
Float |
| float |
|
float |
float |
float |
float32 |
float |
float |
Float |
| int32 |
Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. |
int32 |
int |
int |
int32 |
int |
integer |
Bignum or Fixnum (as required) |
| int64 |
Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. |
int64 |
long |
int/long |
int64 |
long |
integer/string |
Bignum |
| uint32 |
Uses variable-length encoding. |
uint32 |
int |
int/long |
uint32 |
uint |
integer |
Bignum or Fixnum (as required) |
| uint64 |
Uses variable-length encoding. |
uint64 |
long |
int/long |
uint64 |
ulong |
integer/string |
Bignum or Fixnum (as required) |
| sint32 |
Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. |
int32 |
int |
int |
int32 |
int |
integer |
Bignum or Fixnum (as required) |
| sint64 |
Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. |
int64 |
long |
int/long |
int64 |
long |
integer/string |
Bignum |
| fixed32 |
Always four bytes. More efficient than uint32 if values are often greater than 2^28. |
uint32 |
int |
int |
uint32 |
uint |
integer |
Bignum or Fixnum (as required) |
| fixed64 |
Always eight bytes. More efficient than uint64 if values are often greater than 2^56. |
uint64 |
long |
int/long |
uint64 |
ulong |
integer/string |
Bignum |
| sfixed32 |
Always four bytes. |
int32 |
int |
int |
int32 |
int |
integer |
Bignum or Fixnum (as required) |
| sfixed64 |
Always eight bytes. |
int64 |
long |
int/long |
int64 |
long |
integer/string |
Bignum |
| bool |
|
bool |
boolean |
boolean |
bool |
bool |
boolean |
TrueClass/FalseClass |
| string |
A string must always contain UTF-8 encoded or 7-bit ASCII text. |
string |
String |
str/unicode |
string |
string |
string |
String (UTF-8) |
| bytes |
May contain any arbitrary sequence of bytes. |
string |
ByteString |
str |
[]byte |
ByteString |
string |
String (ASCII-8BIT) |