WIP: Add metadata to store record (#1604)

* Add metadata to store record

* Add metadata to cockroach store

* add metadata to store service implementation

* fix breaking cache test

* Test/fix cockroach metadata usage

* fix store memory metadata bug
This commit is contained in:
Asim Aslam
2020-06-03 09:45:08 +01:00
committed by GitHub
parent e4e56b0f3f
commit 7b379bf1f1
10 changed files with 1378 additions and 937 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -1,5 +1,5 @@
// Code generated by protoc-gen-micro. DO NOT EDIT.
// source: store/service/proto/store.proto
// source: github.com/micro/go-micro/store/service/proto/store.proto
package go_micro_store

View File

@@ -11,6 +11,13 @@ service Store {
rpc Tables(TablesRequest) returns (TablesResponse) {};
}
message Field {
// type of value e.g string, int, int64, bool, float64
string type = 1;
// the actual value
string value = 2;
}
message Record {
// key of the record
string key = 1;
@@ -18,6 +25,8 @@ message Record {
bytes value = 2;
// time.Duration (signed int64 nanoseconds)
int64 expiry = 3;
// the associated metadata
map<string,Field> metadata = 4;
}
message ReadOptions {