|
1020 | 1020 | ] |
1021 | 1021 | } |
1022 | 1022 | }, |
| 1023 | + { |
| 1024 | + "body": { |
| 1025 | + "name": "pxtrace.TraceProgram", |
| 1026 | + "brief": "Creates a trace program. Selectors for supported hosts can be specified using key-value arguments.", |
| 1027 | + "examples": [] |
| 1028 | + }, |
| 1029 | + "funcDoc": { |
| 1030 | + "args": [ |
| 1031 | + { |
| 1032 | + "ident": "program", |
| 1033 | + "desc": "The BPFtrace program string.", |
| 1034 | + "types": [ |
| 1035 | + "str" |
| 1036 | + ] |
| 1037 | + }, |
| 1038 | + { |
| 1039 | + "ident": "min_kernel", |
| 1040 | + "desc": "The minimum kernel version that the tracepoint is supported on. Format is `\u003cversion\u003e.\u003cmajor\u003e.\u003cminor\u003e`.", |
| 1041 | + "types": [ |
| 1042 | + "str, optional" |
| 1043 | + ] |
| 1044 | + }, |
| 1045 | + { |
| 1046 | + "ident": "max_kernel", |
| 1047 | + "desc": "The maximum kernel version that the tracepoint is supported on. Format is `\u003cversion\u003e.\u003cmajor\u003e.\u003cminor\u003e`.", |
| 1048 | + "types": [ |
| 1049 | + "str, optional" |
| 1050 | + ] |
| 1051 | + }, |
| 1052 | + { |
| 1053 | + "ident": "host_name", |
| 1054 | + "desc": "Restrict the tracepoint to a specific host.", |
| 1055 | + "types": [ |
| 1056 | + "str, optional" |
| 1057 | + ] |
| 1058 | + } |
| 1059 | + ], |
| 1060 | + "returnType": { |
| 1061 | + "desc": "A pointer to the TraceProgram that can be passed as a probe_fn to UpsertTracepoint.", |
| 1062 | + "types": [ |
| 1063 | + "TraceProgram" |
| 1064 | + ] |
| 1065 | + } |
| 1066 | + } |
| 1067 | + }, |
1023 | 1068 | { |
1024 | 1069 | "body": { |
1025 | 1070 | "name": "pxtrace.UpsertTracepoint", |
|
1045 | 1090 | }, |
1046 | 1091 | { |
1047 | 1092 | "ident": "probe_fn", |
1048 | | - "desc": "The tracepoint function.", |
| 1093 | + "desc": "The tracepoint function, BPFTrace program or pxtrace.TraceProgram to deploy.", |
1049 | 1094 | "types": [ |
1050 | | - "px.ProbeFn" |
| 1095 | + "Union[px.ProbeFn, str, pxtrace.TraceProgram, List[pxtrace.TraceProgram]]" |
1051 | 1096 | ] |
1052 | 1097 | }, |
1053 | 1098 | { |
|
5122 | 5167 | } |
5123 | 5168 | } |
5124 | 5169 | }, |
| 5170 | + { |
| 5171 | + "name": "namespace_name_to_namespace_id", |
| 5172 | + "brief": "Get the Kubernetes UID of the given namespace name.", |
| 5173 | + "desc": "Get the Kubernetes UID of the given namespace name.", |
| 5174 | + "examples": [ |
| 5175 | + { |
| 5176 | + "value": "```\ndf.kube_system_namespace_uid = px.namespace_name_to_namespace_id('kube-system')\n```" |
| 5177 | + } |
| 5178 | + ], |
| 5179 | + "scalarUdfDoc": { |
| 5180 | + "args": [ |
| 5181 | + { |
| 5182 | + "ident": "arg1", |
| 5183 | + "desc": "The name of the namespace to get the UID of.", |
| 5184 | + "type": "STRING" |
| 5185 | + } |
| 5186 | + ], |
| 5187 | + "retval": { |
| 5188 | + "desc": "The Kubernetes UID of the given namespace name", |
| 5189 | + "type": "STRING" |
| 5190 | + } |
| 5191 | + } |
| 5192 | + }, |
5125 | 5193 | { |
5126 | 5194 | "name": "negate", |
5127 | 5195 | "brief": "Negates the passed in value.", |
|
0 commit comments