Skip to content

gRPC API

ikopylov edited this page Jul 14, 2022 · 5 revisions

Bob has an gRPC Api specified in bob-grpc/proto/bob.proto.

Don't type any fields for PutOptions and GetOptions structs.

Methods

Put

Put data to bob cluster by key

Arguments:

  • PutRequest
    • BlobKey key
      • bytes key
    • Blob data
    • PutOptions options
      • repeated string remote_nodes - list of nodes
      • bool force_node - force operation to be served by node to which it comes
      • bool overwrite - overwrite data in case of id existence

Returns:

  • OpStatus
    • BobError error
      • int32 code - error code in case of error
      • string desc - error description

Get

Get data from bob cluster by key

Arguments:

  • GetRequest
    • BlobKey key
      • bytes key
    • GetOptions options
      • bool force_node - force operation to be served by node to which it comes
      • GetSource source - set source for data reading

Returns:

  • Blob
    • bytes data
    • BlobMeta meta
      • uint64 timestamp - timestamp for versioning

Ping

Check availability of service

Arguments:

  • Null - empty structure

Returns:

  • Null - empty structure

Exist

Check if data with presented keys exists

Arguments:

  • ExistRequest
    • repeated BlobKey keys - array of BlobKey
      • bytes key
    • GetOptions options
      • bool force_node - force operation to be served by node to which it comes
      • GetSource source - set source for data reading

Returns:

  • ExistResponse
    • repeated bool exist

BobMeta

message BlobMeta {
	int64 timestamp = 1; 
}

Timestamp used for data versioning and user must set this field.

Clone this wiki locally