Skip to content

Commit 69dc1a3

Browse files
committed
docstring
1 parent 760c58a commit 69dc1a3

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

kele.el

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2086,7 +2086,7 @@ NAMESPACE and CONTEXT are used to identify the resource type to query for."
20862086
(port (if (string-equal (oref resource kind) "services")
20872087
(completing-read "Port: "
20882088
(-map (lambda (port-spec) (number-to-string (alist-get 'port port-spec)))
2089-
(kele--service-ports resource))
2089+
(kele--get-ports-for-resource resource))
20902090
nil t)
20912091
(number-to-string (read-number "Port: ")))))
20922092
(list context ns gvk name port)))
@@ -2137,7 +2137,10 @@ PORTS is used according to `completion-extra-properties'."
21372137
(cl-defun kele--get-ports-for-resource (obj)
21382138
"Get the exposed ports for the resource OBJ.
21392139
2140-
OBJ must be a `kele--resource-container'."
2140+
OBJ must be a `kele--resource-container'.
2141+
2142+
Return value is a list of plists consisting of keys `name',
2143+
`protocol', and `port'."
21412144
(pcase (alist-get 'kind (oref obj resource))
21422145
("Service" (kele--service-ports obj))))
21432146

tests/unit/test-kele.el

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -744,8 +744,7 @@ metadata:
744744
(protocol . "TCP"))
745745
((name . "foo")
746746
(containerPort . 9999)
747-
(protocol
748-
. "TCP"))))))))))))))))
747+
(protocol . "TCP"))))))))))))))))
749748
:to-have-same-items-as
750749
(list '((name . "whatever") (port . 1234) (protocol . "TCP"))
751750
'((name . "foo") (port . 5678) (protocol . "TCP")))))

0 commit comments

Comments
 (0)