github.com/matrixorigin/matrixone@v1.2.0/proto/plugin.proto (about) 1 /* 2 * Copyright 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 plugin; 19 option go_package = "github.com/matrixorigin/matrixone/pkg/pb/plugin"; 20 21 import "github.com/gogo/protobuf/gogoproto/gogo.proto"; 22 import "metadata.proto"; 23 24 option (gogoproto.goproto_enum_prefix_all) = false; 25 26 message Request { 27 uint64 requestID = 1; 28 ClientInfo clientInfo = 2; 29 } 30 31 message ClientInfo { 32 string tenant = 1; 33 string username = 2; 34 string originIP = 3; 35 map<string, string> labelSelector = 4; 36 } 37 38 message Response { 39 uint64 requestID = 1; 40 Recommendation recommendation = 2; 41 } 42 43 enum Action { 44 Select = 0; 45 Reject = 1; 46 Bypass = 2; 47 } 48 49 message Recommendation { 50 Action action = 1; 51 metadata.CNService CN = 2; 52 string message = 3; 53 bool updated = 4; 54 }