mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-04-05 20:52:50 +08:00

Some checks are pending
go: build dev binaries / cleanup (push) Waiting to run
go: build dev binaries / build_dev_linux_windows (amd64, linux) (push) Blocked by required conditions
go: build dev binaries / build_dev_linux_windows (amd64, windows) (push) Blocked by required conditions
go: build dev binaries / build_dev_darwin (amd64, darwin) (push) Blocked by required conditions
go: build dev binaries / build_dev_darwin (arm64, darwin) (push) Blocked by required conditions
docker: build dev containers / build-dev-containers (push) Waiting to run
End to End / FUSE Mount (push) Waiting to run
go: build binary / Build (push) Waiting to run
Ceph S3 tests / Ceph S3 tests (push) Waiting to run
* rename * set agent address * refactor * add agent sub * pub messages * grpc new client * can publish records via agent * send init message with session id * fmt * check cancelled request while waiting * use sessionId * handle possible nil stream * subscriber process messages * separate debug port * use atomic int64 * less logs * minor * skip io.EOF * rename * remove unused * use saved offsets * do not reuse session, since always session id is new after restart remove last active ts from SessionEntry * simplify printing * purge unused * just proxy the subscription, skipping the session step * adjust offset types * subscribe offset type and possible value * start after the known tsns * avoid wrongly set startPosition * move * remove * refactor * typo * fix * fix changed path
100 lines
1.8 KiB
Protocol Buffer
100 lines
1.8 KiB
Protocol Buffer
syntax = "proto3";
|
|
|
|
package schema_pb;
|
|
|
|
option go_package = "github.com/seaweedfs/seaweedfs/weed/pb/schema_pb";
|
|
|
|
///////////////////////////
|
|
// Topic definition
|
|
///////////////////////////
|
|
|
|
message Topic {
|
|
string namespace = 1;
|
|
string name = 2;
|
|
}
|
|
message Partition {
|
|
int32 ring_size = 1;
|
|
int32 range_start = 2;
|
|
int32 range_stop = 3;
|
|
int64 unix_time_ns = 4;
|
|
}
|
|
|
|
message Offset {
|
|
Topic topic = 1;
|
|
repeated PartitionOffset partition_offsets = 2;
|
|
}
|
|
|
|
enum OffsetType {
|
|
RESUME_OR_EARLIEST = 0;
|
|
RESET_TO_EARLIEST = 5;
|
|
EXACT_TS_NS = 10;
|
|
RESET_TO_LATEST = 15;
|
|
RESUME_OR_LATEST = 20;
|
|
}
|
|
|
|
message PartitionOffset {
|
|
Partition partition = 1;
|
|
int64 start_ts_ns = 2;
|
|
}
|
|
|
|
///////////////////////////
|
|
// schema definition
|
|
///////////////////////////
|
|
|
|
message RecordType {
|
|
repeated Field fields = 1;
|
|
}
|
|
|
|
message Field {
|
|
string name = 1;
|
|
int32 field_index = 2;
|
|
Type type = 3;
|
|
bool is_repeated = 4;
|
|
bool is_required = 5;
|
|
}
|
|
|
|
message Type {
|
|
oneof kind {
|
|
ScalarType scalar_type = 1;
|
|
RecordType record_type = 2;
|
|
ListType list_type = 3;
|
|
}
|
|
}
|
|
|
|
enum ScalarType {
|
|
BOOL = 0;
|
|
INT32 = 1;
|
|
INT64 = 3;
|
|
FLOAT = 4;
|
|
DOUBLE = 5;
|
|
BYTES = 6;
|
|
STRING = 7;
|
|
}
|
|
|
|
message ListType {
|
|
Type element_type = 1;
|
|
}
|
|
|
|
///////////////////////////
|
|
// value definition
|
|
///////////////////////////
|
|
message RecordValue {
|
|
map<string, Value> fields = 1;
|
|
}
|
|
message Value {
|
|
oneof kind {
|
|
bool bool_value = 1;
|
|
int32 int32_value = 2;
|
|
int64 int64_value = 3;
|
|
float float_value = 4;
|
|
double double_value = 5;
|
|
bytes bytes_value = 6;
|
|
string string_value = 7;
|
|
ListValue list_value = 14;
|
|
RecordValue record_value = 15;
|
|
}
|
|
}
|
|
message ListValue {
|
|
repeated Value values = 1;
|
|
}
|