Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 23 additions & 1 deletion proto/v1/api.proto
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@ service Octopus {
rpc Listen(stream ListenMessage) returns(stream EventCall);
}

enum PersistanceTarget {
UNKNOWN = 0;
PERMANENT = 1;
CACHED = 2;
Comment thread
raphael-goetz marked this conversation as resolved.
}

/**
* Represents a flexible data object.
*/
Expand All @@ -70,10 +76,13 @@ message Object {

// Timestamp when the object should be permanently deleted.
optional google.protobuf.Timestamp deleted_at = 5;

// Optional target for persistance. If not set: default = permanent
optional PersistanceTarget target = 6;
Comment thread
raphael-goetz marked this conversation as resolved.
}

/**
* A versioned object with metadata from database.
* A versioned object with metadata from database/cache.
*/
message Entry {
// The underlying object.
Expand Down Expand Up @@ -116,6 +125,13 @@ message QueryRequest {

// Entry paginator
Paginator paginator = 7;

// Optional persistence target.
// Selects where the entries are looked up from:
// UNKNOWN => request will be rejected
// PERMANENT => will be looked up inside MongoDB (default)
// CACHED => will be looked up inside NATS
optional PersistanceTarget target = 8;
}

/**
Expand All @@ -124,6 +140,12 @@ message QueryRequest {
message GetRequest {
// Exact key to a object
string key = 1;
// Optional persistance target:
// Location of entry lookup:
// UNKNOWN => request will be rejected
// PERMANENT => will be saved inside the MongoDB (default)
// CACHED => will be saved inside NATS
optional PersistanceTarget target = 8;
Comment thread
raphael-goetz marked this conversation as resolved.
}

message GetResponse {
Expand Down
210 changes: 156 additions & 54 deletions sdk/go/v1/api.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.