Skip to content

Commit 6b5722a

Browse files
[bot] Update pxl script documentation 2023-10-03 (#279)
Signed-off-by: pixie-io-buildbot <build@pixielabs.ai>
1 parent b00df9b commit 6b5722a

1 file changed

Lines changed: 70 additions & 2 deletions

File tree

external/pxl_documentation.json

Lines changed: 70 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1020,6 +1020,51 @@
10201020
]
10211021
}
10221022
},
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+
},
10231068
{
10241069
"body": {
10251070
"name": "pxtrace.UpsertTracepoint",
@@ -1045,9 +1090,9 @@
10451090
},
10461091
{
10471092
"ident": "probe_fn",
1048-
"desc": "The tracepoint function.",
1093+
"desc": "The tracepoint function, BPFTrace program or pxtrace.TraceProgram to deploy.",
10491094
"types": [
1050-
"px.ProbeFn"
1095+
"Union[px.ProbeFn, str, pxtrace.TraceProgram, List[pxtrace.TraceProgram]]"
10511096
]
10521097
},
10531098
{
@@ -5122,6 +5167,29 @@
51225167
}
51235168
}
51245169
},
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+
},
51255193
{
51265194
"name": "negate",
51275195
"brief": "Negates the passed in value.",

0 commit comments

Comments
 (0)