github.com/matrixorigin/matrixone@v1.2.0/proto/status.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 status; 19 option go_package = "github.com/matrixorigin/matrixone/pkg/pb/status"; 20 21 import "github.com/gogo/protobuf/gogoproto/gogo.proto"; 22 import "google/protobuf/timestamp.proto"; 23 24 enum SessionField { 25 NODE_ID = 0; 26 CONN_ID = 1; 27 SESSION_ID = 2; 28 ACCOUNT = 3; 29 USER = 4; 30 HOST = 5; 31 DB = 6; 32 SESSION_START = 7; 33 COMMAND = 8; 34 INFO = 9; 35 TXN_ID = 10; 36 STATEMENT_ID = 11; 37 STATEMENT_TYPE = 12; 38 QUERY_TYPE = 13; 39 SQL_SOURCE_TYPE = 14; 40 QUERY_START = 15; 41 CLIENT_HOST = 16; 42 ROLE = 17; 43 PROXY_HOST = 18; 44 } 45 46 // Session is the information of a session. 47 message Session { 48 // NodeID is the ID of CN node/service. 49 string NodeID = 1; 50 // ConnID is the connection ID of backend server. 51 uint32 ConnID = 2; 52 // SessionID is the session ID. 53 string SessionID = 3; 54 // Account is the tenant name. 55 string Account = 4; 56 // User is the username. 57 string User = 5; 58 // Host is the host name/address and port. 59 string Host = 6; 60 // DB is the database name. 61 string DB = 7; 62 // SessionStart is the start time of this session. 63 google.protobuf.Timestamp SessionStart = 8 64 [ (gogoproto.nullable) = false, (gogoproto.stdtime) = true ]; 65 // Command is the command type. 66 string Command = 9; 67 // Info is the current SQL statement. 68 string Info = 10; 69 // TxnID is the current transaction ID of the session. 70 string TxnID = 11; 71 // StatementID is the last statement ID of the session. 72 string StatementID = 12; 73 // StatementType is the type of the statement: Insert, Update, Delete, Execute, Select. 74 string StatementType = 13; 75 // QueryType is the type of the query: DDL, DML, DQL ... 76 string QueryType = 14; 77 // SQLSourceType is the SQL source type: internal_sql, cloud_nonuser_sql, external_sql, cloud_user_sql. 78 string SQLSourceType = 15; 79 // QueryStart is the start time of query. 80 google.protobuf.Timestamp QueryStart = 16 81 [ (gogoproto.nullable) = false, (gogoproto.stdtime) = true ]; 82 // ClientHost is the ip:port of client. 83 string ClientHost = 17; 84 // Role of the user 85 string Role = 18; 86 // FromProxy denotes whether the session is dispatched from proxy 87 bool FromProxy = 19; 88 // ProxyHost is the host address of proxy connection. 89 string ProxyHost = 20; 90 }