github.com/matrixorigin/matrixone@v1.2.0/proto/gossip.proto (about) 1 /* 2 * Copyright 2021 - 2023 Matrix Origin 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 syntax = "proto3"; 18 package gossip; 19 option go_package = "github.com/matrixorigin/matrixone/pkg/pb/gossip"; 20 21 import "google/protobuf/any.proto"; 22 import "github.com/gogo/protobuf/gogoproto/gogo.proto"; 23 import "query.proto"; 24 import "statsinfo.proto"; 25 26 enum Operation { 27 Unknown = 0; 28 Set = 1; 29 Delete = 2; 30 } 31 32 message GossipData { 33 oneof Data { 34 CacheKeyItem CacheKeyItem = 1; 35 StatsInfoKeyItem StatsInfoKeyItem = 2; 36 } 37 } 38 39 // CacheKeyItem is the item of cache key for data in file-service. 40 message CacheKeyItem { 41 Operation Operation = 1; 42 query.CacheKey CacheKey = 2 [(gogoproto.nullable) = false]; 43 string TargetAddress = 3; 44 } 45 46 message StatsInfoKeyItem { 47 Operation Operation = 1; 48 statsinfo.StatsInfoKey StatsInfoKey = 2 [(gogoproto.nullable) = false]; 49 string TargetAddress = 3; 50 } 51 52 message LocalState { 53 query.CacheKeys CacheKeys = 1 [(gogoproto.nullable) = false]; 54 statsinfo.StatsInfoKeys StatsInfoKeys = 2 [(gogoproto.nullable) = false]; 55 } 56 57 message TargetState { 58 map<string, LocalState> Data = 1; 59 } 60 61 message CommonItem { 62 Operation Operation = 1; 63 string TargetAddress = 2; 64 oneof Key { 65 query.CacheKey CacheKey = 3; 66 statsinfo.StatsInfoKey StatsInfoKey = 4; 67 } 68 }