summaryrefslogtreecommitdiffstats
path: root/storageapi/src/vespa/storageapi/mbusprot/protobuf/feed.proto
blob: 810f88f588f3bcdfa27e23252293c1c6d2361aea (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
// Copyright 2019 Oath Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
syntax = "proto3";

option cc_enable_arenas = true;

package storage.mbusprot.protobuf;

import "common.proto";

message TestAndSetCondition {
    bytes selection = 1;
}

message PutRequest {
    Bucket   bucket                 = 1;
    Document document               = 2;
    uint64   new_timestamp          = 3;
    uint64   expected_old_timestamp = 4; // If zero; no expectation.
    TestAndSetCondition condition   = 5;
}

message PutResponse {
    BucketInfo bucket_info        = 1;
    BucketId   remapped_bucket_id = 2;
    bool       was_found          = 3;
}

message Update {
    bytes payload = 1;
}

message UpdateRequest {
    Bucket bucket                 = 1;
    Update update                 = 2;
    uint64 new_timestamp          = 3;
    uint64 expected_old_timestamp = 4; // If zero; no expectation.
    TestAndSetCondition condition = 5;
}

message UpdateResponse {
    BucketInfo bucket_info        = 1;
    BucketId   remapped_bucket_id = 2;
    uint64     updated_timestamp  = 3;
}

message RemoveRequest {
    Bucket bucket                 = 1;
    bytes  document_id            = 2;
    uint64 new_timestamp          = 3;
    TestAndSetCondition condition = 4;
}

message RemoveResponse {
    BucketInfo bucket_info        = 1;
    BucketId   remapped_bucket_id = 2;
    uint64     removed_timestamp  = 3;
}

message GetRequest {
    Bucket bucket           = 1;
    bytes  document_id      = 2;
    bytes  field_set        = 3;
    uint64 before_timestamp = 4;
    enum InternalReadConsistency {
        Strong = 0; // Default for a good reason.
        Weak = 1;
    }
    InternalReadConsistency internal_read_consistency = 5;
}

message GetResponse {
    Document   document                = 1;
    uint64     last_modified_timestamp = 2;
    BucketInfo bucket_info             = 3;
    BucketId   remapped_bucket_id      = 4;
}

message RevertRequest {
    Bucket   bucket               = 1;
    repeated uint64 revert_tokens = 2;
}

message RevertResponse {
    BucketInfo bucket_info        = 1;
    BucketId   remapped_bucket_id = 2;
}

message RemoveLocationRequest {
    Bucket bucket             = 1;
    bytes  document_selection = 2;
}

message RemoveLocationResponse {
    BucketInfo bucket_info        = 1;
    BucketId   remapped_bucket_id = 2;
}