github.com/inspektor-gadget/inspektor-gadget@v0.28.1/pkg/gadgettracermanager/api/gadgettracermanager.proto (about) 1 // Copyright 2019-2021 The Inspektor Gadget authors 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 15 syntax = "proto3"; 16 17 option go_package = "github.com/inspektor-gadget/inspektor-gadget/pkg/gadgettracermanager"; 18 19 package gadgettracermanager; 20 21 service GadgetTracerManager { 22 // Methods called via kubectl-exec 23 rpc ReceiveStream(TracerID) returns (stream StreamData) {} 24 25 // Methods called by OCI Hooks 26 rpc AddContainer(ContainerDefinition) returns (AddContainerResponse) {} 27 rpc RemoveContainer(ContainerDefinition) returns (RemoveContainerResponse) {} 28 29 // Methods called for debugging 30 rpc DumpState(DumpStateRequest) returns (Dump) {} 31 } 32 33 message Label { 34 string key = 1; 35 string value = 2; 36 } 37 38 message AddContainerResponse { 39 string debug = 1; 40 } 41 42 message RemoveContainerResponse { 43 string debug = 1; 44 } 45 46 message TracerID { 47 string id = 1; 48 } 49 50 message StreamData { 51 string line = 1; 52 } 53 54 message OwnerReference { 55 string apiversion = 1; 56 string kind = 2; 57 string name = 3; 58 string uid = 4; 59 } 60 61 message ContainerDefinition { 62 string id = 1; 63 uint32 pid = 2; 64 string oci_config = 3; 65 66 // NRI and OCI hooks don't give the OCI config but give pod details 67 string namespace = 4; 68 string podname = 5; 69 string name = 6; 70 repeated Label labels = 7; 71 // Some hooks do not have information about the pod labels 72 bool labels_set = 8; 73 } 74 75 message DumpStateRequest { 76 } 77 78 message Dump { 79 string containers = 1; 80 string traces = 2; 81 string stacks = 3; 82 }