github.com/inspektor-gadget/inspektor-gadget@v0.28.1/pkg/gadget-service/api/consts.go (about) 1 // Copyright 2023-2024 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 package api 16 17 const ( 18 VersionGadgetInfo = 1 19 VersionGadgetRunProtocol = 1 20 ) 21 22 const ( 23 EventTypeGadgetPayload uint32 = 0 24 EventTypeGadgetResult uint32 = 1 25 EventTypeGadgetDone uint32 = 2 26 EventTypeGadgetJobID uint32 = 3 27 28 // EventTypeGadgetInfo is transmitted after a gadget has been initialized; while GetGadgetInfo() can return 29 // cached data, this payload will always be up-to-date and reflect the actual layout of the data that is 30 // expected / sent. 31 EventTypeGadgetInfo uint32 = 4 32 33 EventLogShift = 16 34 ) 35 36 const ( 37 GadgetServicePort = 8080 38 DefaultDaemonPath = "unix:///var/run/ig/ig.socket" 39 ) 40 41 const ( 42 DataSourceFlagsBigEndian uint32 = 1 << iota 43 ) 44 45 const ( 46 TypeUnknown = "" 47 TypeBool = "bool" 48 TypeString = "string" 49 TypeBytes = "bytes" 50 TypeInt = "int" 51 TypeInt8 = "int8" 52 TypeInt16 = "int16" 53 TypeInt32 = "int32" 54 TypeInt64 = "int64" 55 TypeUint = "uint" 56 TypeUint8 = "uint8" 57 TypeUint16 = "uint16" 58 TypeUint32 = "uint32" 59 TypeUint64 = "uint64" 60 TypeFloat32 = "float32" 61 TypeFloat64 = "float64" 62 TypeDuration = "duration" 63 TypeIP = "ip" 64 ) 65 66 const ( 67 // TagSrcEbpf defines that a field was extracted from eBPF 68 TagSrcEbpf = "src:ebpf" 69 )